Support » Themes and Templates » Exclude from search

  • Hi,

    I’ve created a new custom post type, and set the value of “exclude_from_search” to true. But when I search on my website, it still returns the custom post type results.

    This is a part of the code:

    $args = array(
       'labels' => $labels,
       'public' => true,
       'exlude_from_search' => true,
       'show_in_menu' => true,
       'supports' => array('title', 'editor', 'thumbnail')
    register_post_type('testimonials', $args);

    What am I doing wrong?
    Thanks in advance!

  • The topic ‘Exclude from search’ is closed to new replies.