This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Category description not show

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Category description not show

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23012
    smartbrandsmartbrand
    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 MarcinkoErnest 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!

    #23023
    smartbrandsmartbrand
    Participant

    Hi Ernest,

    Runs correctly.

    Rhank you very much,

    #23024
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #23025
    smartbrandsmartbrand
    Participant

    Hi Ernest,

    Done!

    Thanks,

    #23026
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Category description not show’ is closed to new replies.