Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #26361

    I have created a CPT and then have a page set up with the builder and have the blog component to pull in the specific CPT.

    Can I create a loop for this specific component just like I would if I wanted to use archive-my-page.php and loop-my-page.php


    Hi kcharity,

    I’m not really clear on what you mean. If you are using a custom post type with the builder and then have content within the builder for that page the only thing that would be effect is the_content of whatever page that renders it.

    So if you make a page that wordpress would pull based on the template hierarchy ( ) the_content is where the advanced layout editors output would get pushed.

    Look at the single-portfolio.php for reference.




    Sorry for not being clear on that Devin.

    I have a CPT created. and am using the builder on a page that uses the widget to pull in blog content. That component is set to pull in the articles for that CPT. So that page acts like an archive listing the posts for that CPT.

    So when I go to that page it shows the layout defined by my builder layout and blog content that I have chosen with the component. But the output of that blog component is not what I would like so I am curious as to what file it is using to do the loop and output the content. And is is possible to create a custom loop for it?


    The blog element code can be found in wp-contentthemesenfoldconfig-templatebuilderavia-shortcodesblog.php and it uses the standard post loop file includes/loop-index.php. You could rewrite it and include different templates based on the taxonomy attribute like

    if($atts['taxonomy'] == 'mytaxonoy')
    get_template_part( 'includes/loop', 'mytemplate' );
    get_template_part( 'includes/loop', 'index' );


    Thanks Dude, that look to be what I would like to do.

    What would you recommend for use in a child theme as to not overwrite the core theme files?


    I’d recommend to create a new element. Make a copy of blog.php and rename the class (otherwise you’ll get a php error). Then modify the code and include it with the child theme functions.php (include() or require_once()).

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘What loop does a page with a blog widget from the builder use?’ is closed to new replies.