pre_get_posts not firing at all

Try adding this to your functions.php. function my_custom_get_posts( $query ) { if ( is_admin() || ! $query->is_main_query() ) return; if ( $query->is_search() ) { $query->set( ‘post_type’, array( ‘post’, ‘movie’ ) ); } } add_action( ‘pre_get_posts’, ‘my_custom_get_posts’, 1 ); Also make sure you do not have any other pre_get_posts action overwriting this function’s effect.

How do populate a column when listing custom posts?

Make sure your hook knows to accept two arguments as shown in the codex example.1 add_action( ‘manage_stb_custom_column’, ‘stb_output_cols’, 10, 2); See the $accepted_args2 parameter in the function reference of WP codex. Note that the “10” preceding this parameter is the default priority, but you have to include that so the action knows that “2” is … Read more