Sidebar does not display on blog page, but fine with static pages

<!– Obsolete You have to create the file named single.php for your single post template. If you use custom post types, name the file like single-my_custom_post_type.php, where my_custom_post_type part is your registered custom post type. Otherwise index.php is used by default. –> Edited: You have to change the file name from page_blog.php to page-blog.php. Notice … Read more

why is this content-template not showing any of my blog-entries?

With this code: get_template_part(‘content’, ‘page’ ); WordPress will try to load a file called content-page.php and if this file doesn’t exist then it will try to load content.php. Your theme seems to have the file content-page.php, so if you want to load content.php you should use: get_template_part(‘content’); EDIT: You have edited the question and delete … Read more

Passing additional variables to a query

If you’re running a custom query like $blog_query, add them right in. If you are wanting to change the main query, use the pre_get_posts action to alter the function. add_action( ‘pre_get_posts’, ‘alter_blog_order’ ); function alter_blog_order( $query ) { if( $query->is_main_query() and $query->is_post_type_archive( ‘post’ ) ) { $query->set( array( ‘orderby’ => ‘post-title’, ‘order’ => ‘ASC’ ) … Read more

Can’t create new Pods pages

I found the problem. There was a line of code that was deleting all posts as soon they were created. It may seems slly but it was wanted, I’m building a really custom app based on wordpress… Simply I forgot that this would cancel many other things that pods saves as post, like pods pages … Read more

Getting grandchildren of a post with a specified custom taxonomy?

I was able to achieve this by, funnily enough, using with get_pages() and WP_Query(). I wanted a reusable function that would return a WP_Query array that I could loop through, so I came up with this: function returnChildGeographies($geoID, $geoType, $grandChildren = false) { $args = array( ‘post_type’ => ‘geographies’, ‘posts_per_page’ => -1, ‘orderby’ => ‘post_title’, … Read more