Results showing wrong description

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Results showing wrong description

This topic contains 11 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 years, 6 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #34515
    zonita08
    zonita08
    Participant

    Hi, the results page is not showing same content as the dropdown results. There is some issue with the plugin. Please check the attached images. The description of dropdown is correct but the description on results page is gibberish. We need to fix the description on Results page.

    Attachments:
    You must be logged in to view attached files.
    #34522
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Unfortunately the plugin can not change the texts on the results page, it is controlled by the theme you are using. You may have to check your theme options for that.
    If you want, you can actually display the same exact text on the results page, but it requires some custom coding, as there is no other trustworthy way to change the results page contents.

    Best,
    Ernest Marcinko

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


    #34673
    zonita08
    zonita08
    Participant

    Hi,

    I did try adding the_asp_result_field($field = ‘content’, $echo = true); in the code but it returns all the tags etc along with the content which is not the same as description in dropdown. What’s the name of the field that I can use to get the description of search results same as the one in dropdown? I know the results are stored in $r but even that is not working.

    Attachments:
    You must be logged in to view attached files.
    #34677
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Looks like the shortcodes are not being executed there. Try this:

    do_shortcode( the_asp_result_field('content', false) );

    Best,
    Ernest Marcinko

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


    #34715
    zonita08
    zonita08
    Participant
    You cannot access this content.
    #34728
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hm, interesting. Maybe the HTML stripping is also skipped. Try this:

    echo wd_substr_at_word( strip_tags( do_shortcode( the_asp_result_field('content', false) ), '<strong>'), 160);

    This should get rid off most of HTML tags, and strip the length to 160 characters max.

    Best,
    Ernest Marcinko

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


    #34746
    zonita08
    zonita08
    Participant

    That just returns the title. https://www.staging9.canadaid.ca/

    This is the site.

    Attachments:
    You must be logged in to view attached files.
    #34761
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Maybe the do_shortcode function does not work in that context for some reason.

    Try maybe this variation:

    echo wd_substr_at_word( wd_strip_tags_ws( apply_filters( 'the_content', get_asp_result_field('content') ), '<abbr><b>'), 200);

    ..or if that does not work, it should be almost equivalent to this:

    echo wd_substr_at_word( wd_strip_tags_ws( apply_filters( 'the_content', get_the_content() ), '<abbr><b>'), 200);

    Best,
    Ernest Marcinko

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


    #34773
    zonita08
    zonita08
    Participant
    You cannot access this content.
    #34778
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Can you please add temporary FTP and back-end access?

    I would like to debug these custom codes to see where it fails. It is probably something very minor I’m not noticing.

    Best,
    Ernest Marcinko

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


    #34798
    zonita08
    zonita08
    Participant
    You cannot access this content.
    #34803
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thanks!

    I made an adjustment to the search plugin code to force the same post-processing for the non-ajax results, now the
    the_asp_result_field('content', true); call should return exactly the same strings as in the live results list.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.