Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Category description not show
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 11 months ago.
- AuthorPosts
- June 3, 2019 at 4:08 pm #23012
Hi,
We’re trying to see category description in search result, but we don’t show. We gry to use the id, but returns “-10” http://prntscr.com/nx29ru
We configure to see title and description http://prntscr.com/nx2amp, but nothing.
How can we show it?
Thanks,
June 4, 2019 at 9:04 am #23019Hi,
The ID of those items is set to -10 on purpose, otherwise wordpress would parse it as a Post. It might be however possible possible to get the original term ID via the Ajax Search Pro theme API functions.
In your case, to get the ID, you can use this call within the posts loop:
$id = get_asp_result_field('id');
It might be also possible to get the short description directly, like so:
$term = get_term( $id ); echo $term->description;
That may do the trick!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 4, 2019 at 1:00 pm #23023Hi Ernest,
Runs correctly.
Rhank you very much,
June 4, 2019 at 1:03 pm #23024You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 4, 2019 at 1:06 pm #23025Hi Ernest,
Done!
Thanks,
June 4, 2019 at 1:08 pm #23026You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘Category description not show’ is closed to new replies.