Category description not show

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 Ernest Marcinko 4 years, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23012
    smartbrand
    smartbrand
    Participant

    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,

    #23019
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #23023
    smartbrand
    smartbrand
    Participant

    Hi Ernest,

    Runs correctly.

    Rhank you very much,

    #23024
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #23025
    smartbrand
    smartbrand
    Participant

    Hi Ernest,

    Done!

    Thanks,

    #23026
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Category description not show’ is closed to new replies.