1
vote
3answers
77 views

Some doubts about how to show posts in a custom theme?

I am pretty new in WordPress theme development and I have some doubt about this WP function used to show my post in the homepage: <?php if ( have_posts() ) : // Start the ...
0
votes
1answer
119 views

get_template_part() to render single page Theme

I´m developing a single page theme and want to render all pages with their respective templates on a single page. I know I could make a query and write the markup for the respective page, but I prefer ...
0
votes
1answer
112 views

Tag page only display 10 posts

I've had a problem with this for quite some time now and cannot for the life of me figure it out. I am using Multi-site and not sure if that has anything to do with it or not, so keep that in mind. ...
1
vote
1answer
35 views

Problems with loop

I have this loop in my index.php: <?php if (have_posts()) : while (have_posts()) : get_template_part( 'post' ); endwhile; endif; ?> which calls ...
0
votes
0answers
99 views

Posts 2 Posts, losing connection in template parts

I am using the Post 2 Posts plugin to connect different post types. My code works perfectly when it's all in one file (archive.php). The problem I have is taht I want to split out the part that does ...
2
votes
1answer
914 views

get_template_part from plugin

This is default get_template_part function inside WordPress: function get_template_part( $slug, $name = null ) { do_action( "get_template_part_{$slug}", $slug, $name ); $templates = array(); ...
0
votes
4answers
408 views

How do I display an image before the first post of the loop when I'm using get_template_part?

I have used $count before, but never run into this problem. I cannot get it to work. I have limited php background, so please be patient with me! Here is the $count setup code: <?php $count = ...
2
votes
2answers
2k views

Using a custom WP_Query with get_template_part loop

I have a query for a custom post type: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $books = new WP_Query(array( 'post_type' => 'wiki', 'posts_per_page' => ...
-1
votes
2answers
349 views

First post outside of loop, homepage only?

Because of the way my templates are structured, I need to pull the first/sticky post from the site outside of the standard loop, just on the homepage. I'm using _s (underscores.me) as a base, so the ...
0
votes
2answers
799 views

how to replace get_template_part('loop','tag') with explicit styled version?

So my theme has a tag.php, that contains this line: get_template_part('loop','tag'); that runs the loop and spits out the tag entries. I'm modifying it to include post thumbnails (using ...
1
vote
2answers
906 views

get_template_part() - post-meta not working?

Maybe I simply do not understand what get_template_part() is doing … I have a file called event-list.php that should work as template for other pages and files so all my events (a custom post type) ...
1
vote
1answer
721 views

Post Format single-loop.php using get_template_part

I have set up to use post formats gallery and video in addition to the standard. I am editing the loop-single.php to give it different layouts for each post format, but I'm to include ...
0
votes
1answer
60 views

Custom fields in post later used in loop

How i can add custom fields to custom post templates, and later print them in The Loop? Better explanation: I want to have a custom field in "Add New" window, which will be added as some meta data to ...
0
votes
1answer
127 views

what template-part to call, to have my post in the center of the page?

i was wondering if you could help me : i would like to change the center of my page only with my posts : (all my posts will be in the same category) : how can i construct the page : so : 1.my menu ...
0
votes
1answer
132 views

strange parse error when including a loop template within another template

I have a loop template called loop-event-details.php where I have code to display each event. My main page template is called events-page.php. I use the following code to include the loop template: ...
1
vote
2answers
1k views

get_template_part and template file names

I have a custom post type that is going to use a loop in a couple different places and I wanted to make maintaining those loops easier. I remembered that get_template_part() is available and figured ...