Not all posts showing in query

There seems to be a syntax in your Query: post_type=”posts&posts_per_page=-1″ would mean that your post type is posts&posts_per_page=-1 I think you mean $posts_query = new WP_Query(‘post_type=post&posts_per_page=-1’); (The post type is not posts, but post) In this case WordPress would not apply anyhting at all (because it contain errors, but just fetches the default post type … Read more

Cannot implement byline into posts container in single.php

On single.php, as I mentioned earlier, there is no loop to put the PHP code into. If your theme follows WordPress standards, there will be a loop. You’ll likely find it in the Template Part files that are being called in your If/Then statement. Look for the following files under [theme folder]\templates\: template_single_multi.php template_single.php Right … Read more

Having pages after specifying post_type post

Your cat_n_tag_archives() function is adding pages to all category and tag results indiscriminately. What you probably want (and I am guessing a little) is to restrict that filter to the main query only: function cat_n_tag_archives($wp_query) { if (!$wp_query->is_main_query()) return; // This bit checks for the main query $ary_one = array(‘post’, ‘page’); if ($wp_query->get(‘category_name’) || $wp_query->get(‘cat’)) … Read more

When moving a WordPress installation to a new server, why do I have to update each post before content shows?

jdm2112 identified the issue as being caused by missing tables as part of the migration process within the comments for the original question: You imported just the single table into another WordPress DB? THAT is the problem. Post IDs are unique between sites… I would avoid working with individual tables unless absolutely necessary After migrating … Read more

All categories displays the same posts

query_posts breaks the main query object ($wp_query) which holds the query object and all relevant query info which breaks all conditional tags and pagination and page functionality, which simply means that it is totally useless trying to use any info regarding the main query object as it was all corrupted by query_posts resetting the main … Read more