WordPress.org

Forums

[resolved] Admin Search Custom Post Type (6 posts)

  1. joshrodgers
    Member
    Posted 3 years ago #

    I have a wordpress site with a few custom post types.

    The other day I tried to search for something through the wordpress backend and noticed that wordpress searches posts, but not custom post type posts...is there something I need to do to enable this?

    I'm sure I'm not the only one who has ran across this issue, but for some reason I cannot find any resources on this at all.

    Thanks,
    Josh

  2. Pioneer Web Design
    Member
    Posted 3 years ago #

    This may help.

  3. joshrodgers
    Member
    Posted 3 years ago #

    Swanson,

    This is helpful for front-end searches, but not back-end searches. The WordPress back-end (or admin panel) is only searching through posts not custom post type posts. I was hoping there was some kind of filter or piece of code I was missing that would enable me to do that :)

    Thanks,
    Josh

  4. joshrodgers
    Member
    Posted 3 years ago #

    Figured it out!!

    I didn't realize this...but I had this code in my functions file: http://pastebin.com/PVaYWQzL. Little did I know it affected both the front-end and back-end.

    After I removed the code, my search worked!!

    Thanks,
    Josh

  5. Pioneer Web Design
    Member
    Posted 3 years ago #

    I am not quite sure I realize your understanding of 'Front end' and 'Back end'...

  6. AmirHelzer
    Member
    Posted 3 years ago #

    It's not quite related to the actual question, but if you're dealing with WP search, you should also checkout Relevanssi:
    http://wordpress.org/extend/plugins/relevanssi/

    We use it on wpml.org and wp-types.com and loving it. There no comparing between the built in WP search and this one.

Topic Closed

This topic has been closed to new replies.

About this Topic