Posts Not Paginating

I am copying a clients site over, so I have exported and reinported the posts etc, and the theme into their new site. Unfortunately the problem being that this is not my theme, im copying it over for a client and its displaying correctly on their old site on a lower version of wordpress For … Read more

Print all content of a paged post

One way to acheive this is to create a filter on the_content(); This will completely stop the <!–nextpage–> shortcode from working wherever the_content(); is called in your theme – i.e. on all posts You can add the filter by adding this to your functions file: function remove_page_144242($content){ global $post; // Accesses the post content while … Read more

2nd post different layout

Ok solution found. I forgot to use the {} and now it works. Here goes: <?php $query = new WP_Query( array( ‘post_type’ => array( ‘custom_post_type’ ) ) ); $i = 0; while ( $query->have_posts() ) : $query->the_post(); if ($i%2==0){ echo ‘1st post here’; } if ($i%2==1){ echo ‘2nd post here’; } $i++; endwhile; ?>

Insert wordpress tags below posts via functions.php

If all you want to do is add tags to the post body without writing them into the theme templates, all you really need to do is: add_filter( ‘the_content’, function($content) { return $content.get_the_tag_list(); } ); See get_the_tag_list() for arguments. That, by the way, is basically what the the_tags() function does. However, there are other ways … Read more