Include a HTML link in no results found text

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Include a HTML link in no results found text

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20430
    tjldesigns
    tjldesigns
    Participant

    Hi Ernest,

    I hope you’re well :).

    I wonder is there a way to include a HTML link in the ‘results not found’ copy that shows for the form?

    If you try a search for a random piece of text on the search field here: http://kemplittle.com.cpanel2-realityhouse.temporarywebsiteaddress.com/ you will see where I’ve tried to add a link but it shows as HTML, anything we can do to get that to work? 🙂

    Many thanks,
    Tonya

    #20443
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tonya,

    Well, the text in that field is HTML escaped, so that won’t work. But there is a different way, by results templating. If you read up on that knowledge base, it will explain some basic details.
    Basically, you need to make a directory in your theme/child theme directory called asp. Then copy over the no-results.php file from the wp-content/plugins/ajax-search-pro/includes/views/results/ directory. Then making changes directly to this file is the key, as this is included when printing the ‘no results’ text. You can add the link or any custom HTML code in there.

    Best,
    Ernest Marcinko

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


    #20460
    tjldesigns
    tjldesigns
    Participant

    Hi Ernest,

    This is perfect, thanks ever so much, now added and working great :).

    Thank you for your quick help as always, so much appreciated.

    Have a lovely Christmas and all the best for 2019.

    Many thanks,
    Tonya

    #20461
    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 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.