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 1 year, 6 months ago.
- AuthorPosts
- September 3, 2021 at 5:39 am #34515
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.September 3, 2021 at 8:56 am #34522Hi,
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.
Best,
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.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 12, 2021 at 8:06 pm #34673Hi,
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.September 13, 2021 at 7:59 am #34677Looks like the shortcodes are not being executed there. Try this:
Best,do_shortcode( the_asp_result_field('content', false) );
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 14, 2021 at 4:32 am #34715You cannot access this content.September 14, 2021 at 9:18 am #34728Hm, 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 :)
September 14, 2021 at 8:05 pm #34746That just returns the title. https://www.staging9.canadaid.ca/
This is the site.
Attachments:
You must be logged in to view attached files.September 15, 2021 at 9:24 am #34761Maybe 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:
Best,echo wd_substr_at_word( wd_strip_tags_ws( apply_filters( 'the_content', get_the_content() ), '<abbr><b>'), 200);
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 15, 2021 at 5:03 pm #34773You cannot access this content.September 15, 2021 at 8:08 pm #34778Can 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 :)
September 16, 2021 at 10:24 pm #34798You cannot access this content.September 17, 2021 at 10:04 am #34803Thanks!
I made an adjustment to the search plugin code to force the same post-processing for the non-ajax results, now the
Best,
the_asp_result_field('content', true);
call should return exactly the same strings as in the live results list.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.