404 process
-
Hi,
I am using pre_get_posts to modify the main query for CPT based on categories and meta queries, which works fine. But one issue, when no results are found, it uses a “no posts found” page (the standard one) rather than run the code on the archive page (i have code to deal with no posts found).
Is this set by the set up or is there a way to hook into the process to stop it pulling the 404 template
$args = array_merge( // Default array( 'label' => $plural, 'labels' => $labels, 'public' => true, 'show_ui' => true, 'supports' => array('title', 'editor'), 'show_in_nav_menus' => true, '_builtin' => false, ), // Given args $this->post_type_args ); // Register the post type register_post_type($this->post_type_name, $args);
- The topic ‘404 process’ is closed to new replies.