Page template for a site from network

You could use the filter theme_page_templates present since 3.9.0 like so: function my_theme_page_templates( $page_templates, $this, $post ) { $travel_blog_id = 2; $blog_id = get_current_blog_id(); if($blog_id != $travel_blog_id) { if(isset($page_templates[‘page-travel.php’])) { unset($page_templates[‘page-travel.php’]); } } return $page_templates; } add_filter( ‘theme_page_templates’, ‘my_theme_page_templates’, 20, 3 );

Custom WP_Query doesn’t display all posts

All thanks to @PieterGoosen’s comment, I figured out that this issue was due to a setting within the WPML (multilingual) plugin. Under the ‘translation management’->’multilingual content setup’ tab of the plugin settings, there is a section for ‘custom posts’. In this section, my ‘publications’ post type was not set for translation, and this somehow prevented … Read more

Is there alternative to WP_List_Table?

My choice would be to use WP_List_Table. If you continue reading the Codex it makes it clear that it is commonly used by third party code. “Someday” it might go away, but I doubt it will happen abruptly (if at all). If it does change, there will probably be a newer solution to replace it. … Read more

Set thumbnail and title for a post type archive (not post itself!)

Do you mean something like this? $args = array( ‘labels’ => $labels, ‘public’ => true, ‘publicly_queryable’ => true, ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => true, ‘capability_type’ => ‘post’, ‘hierarchical’ => false, ‘menu_position’ => null, ‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘excerpt’, ‘comments’ ) ); This code goes after the function that creates … Read more