If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
July 17, 2013 at 9:22 pm #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.phpJuly 19, 2013 at 2:09 am #130148
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 ( http://codex.wordpress.org/Template_Hierarchy ) the_content is where the advanced layout editors output would get pushed.
Look at the single-portfolio.php for reference.
DevinJuly 19, 2013 at 3:08 pm #130149
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?July 22, 2013 at 6:27 am #130150
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' );
}July 22, 2013 at 6:38 pm #130151
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?July 24, 2013 at 4:56 am #130152
The topic ‘What loop does a page with a blog widget from the builder use?’ is closed to new replies.