0

I have a number of custom post types for which the admin can tag each separate posts. The problem : None of the posts show upon front-end search query with any of the tags... Is this normal ? have I not configured my custom type properly ? below my post type registration:

$args = array(
'labels'             => $labels,
'public'             => true,
'publicly_queryable' => true,
'show_ui'            => true,
'show_in_menu'       => true,
'query_var'          => true,
'taxonomies'         => array('post_tag'),
'rewrite'            => array( 'slug' => 'enseigne' ),
'capability_type'    => 'post',
'has_archive'        => true,
'hierarchical'       => false,
'menu_position'      => 7,
'menu_icon'          => $theme_url . '/images/enseignes16x16.png',  
'supports'           => array( 'title', 'author', 'editor', 'thumbnail','comments')  );
register_post_type( 'enseigne', $args );
2
  • do you mean that you search for the tag name and you get no results? Commented Dec 1, 2013 at 8:46
  • Yes, Mark,That's exactly the issue.. :( Say that I tagged a custom post with the word 'shop', search the site from the front-end with it,: it returns no results (to illustrate the issue, the tag 'shop' is only used with this given post, which is a custom post type....)
    – JMB
    Commented Dec 1, 2013 at 8:56

1 Answer 1

1

This is normal functionality of wordpress, the default built in search is done only in the title and content of a post.

1
  • HI Mark, & thanks for your quick headsup. I thought as much, but haven't found anything on the forum on how to include custom post type content / tags in the front-end search. I'm sure I could use an action hook, but am a really newbie at this. Any idea to get me started ? Many thanks,
    – JMB
    Commented Dec 1, 2013 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.