joshrodgers
Member
Posted 5 months 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
joshrodgers
Member
Posted 5 months 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
joshrodgers
Member
Posted 5 months 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
I am not quite sure I realize your understanding of 'Front end' and 'Back end'...
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.