Question About Using Custom Results URL

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Question About Using Custom Results URL

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9295
    shoutcloud
    shoutcloud
    Participant

    On the following page I have an ASP box:

    http://www.floridaplants.net/askthehonestgab/

    I am using a custom field as the results URL. The custom field value is a youtube video link.

    I want to be able to click on the search results and then have the video open up and display in a fancybox or other type of lightbox.

    I have fancybox lightbox installed, have created a custom asp folder and isotope template, and added the “fancybox-youtube” class into the anchor tag. But when I click on a search result it just opens the youtube url directly and ignores the fancybox class directive.

    Any idea how to make this work the way I am wanting it to?

    #9306
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    The reason why it’s not working is because the fancybox script you are using does not register on dynamically created elements such as search results. (only on elements which are already there when the page is loaded)

    I’ve put together a small snippet for you to solve this issue. Put this script into the footer of your theme, before the closing body tag (most likely located in footer.php file in your current theme directory):

    This script basically registers the fancybox when the user hovers over a search result. For this solution you don’t need to add the “fancybox-youtube” class, it should work without that.

    Best,
    Ernest Marcinko

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


    #9307
    shoutcloud
    shoutcloud
    Participant

    Your script works beautifully!

    I am grateful for your help on this.

    I love your plugin.

    I will be leaving a 5 star review on Code Canyon for you.

    Thanks so much!

    #9309
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you very much for the beautiful review and your kind words, I really appreciate it 🙂

    If you don’t mind I will close this topic and mark it as resolved for now, feel free to open another one if you have other issues.

    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)

The topic ‘Question About Using Custom Results URL’ is closed to new replies.