Forums › Forums › Search & Filter Pro › How to show cats title in search result?
- This topic has 14 replies, 6 voices, and was last updated 9 years, 3 months ago by Ross.
-
Ross Moderator(Private) March 22, 2015 at 2:56 pm #13803
It sounds fine, if its not working then I’d double check whether your ID is definitely correct.
This is how I have my results.php setup and was working fine:
https://www.designsandcode.com/wp-content/uploads/2015/03/results.zip
Although this was just for testing, I think the function should go in functions.php of your theme.
*EDIT* – after thought – if we are loading results via
wp-admin/admin-ajax.php
– then maybe this doesn’t load your theme, and therefor not the function either – I’m not sure on this haven’t had time to test.Either way, I’ll be integrating some functions in to the plugin at some point that will handle all this automatically.
Thanks
Ross Moderator(Private) May 17, 2015 at 8:24 pm #17701Hey Jessie can you open a new ticket and explain in a little more detail what your setup is what you’ve tried to do?
Thanks
Ross Moderator(Private) August 24, 2015 at 12:00 pm #23665Hey Adam, this is now just standard WP template stuff:
https://codex.wordpress.org/Function_Reference/category_description
If you need the ID you can use the slug to grab the category ID:
https://codex.wordpress.org/Function_Reference/get_category_by_slug
I think the description might even be returned in the object from this second link so you might not need the
category_description
function at all -
AuthorPosts