Title: Exclude from search
Last modified: August 20, 2016

---

# Exclude from search

 *  [jasonsweb](https://wordpress.org/support/users/jasonsweb/)
 * (@jasonsweb)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/exclude-from-search-2/)
 * 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.

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [exclude](https://wordpress.org/support/topic-tag/exclude/)

 * 0 replies
 * 1 participant
 * Last reply from: [jasonsweb](https://wordpress.org/support/users/jasonsweb/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/exclude-from-search-2/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
