Open the PDF file after searching it with the customised Post name

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Open the PDF file after searching it with the customised Post name

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

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45326
    Arbron
    Arbron
    Participant

    I created a filter on a site where we have pdf files that are product details. These kinds of pdfs are linked to special acf posts called Sicherheitsdatenblätter.

    When I search I would like it to search for names based on the name of the post and not the name of the pdf. When clicking on the searched pdf it should then open in a new page.

    There is also a button option to load the further list of pdf’s, this should search the pdf’s in the list even if not yet opened.

    Attachments:
    You must be logged in to view attached files.
    #45328
    Arbron
    Arbron
    Participant
    #45342
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thanks for the details, it helps a lot!

    In that case I believe you want to choose the “Sicherheitsdatenblätter” post type on the Search Sources panel for searching – and not the actual media files.
    Thenb use this custom code to change the URL of the results to the custom URL field from ACF. All you need to change there is the $meta_key variable to:
    $meta_key = 'Link zur Datei';

    To open the results on a new panel, use this option.

    Best,
    Ernest Marcinko

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


    #45347
    Arbron
    Arbron
    Participant

    Hi there, thank you for the help!

    COuld you do it form me or it’s not püossible? I dont know where to put that code.

    #45350
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sure!

    I have placed it into the child theme functions.php file, it should be in effect now 🙂

    Best,
    Ernest Marcinko

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


    #45357
    Arbron
    Arbron
    Participant

    Thank you very much for your amazing job. Could you also do it to open on a new page?

    #45358
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sure! It should be opening on a new window now.

    Best,
    Ernest Marcinko

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


    #45376
    Arbron
    Arbron
    Participant

    Hi there, thank you so much!

    I noticed another problem. WHen I search for the pdf files only the first ones are displayed, the ones that come on load click of the button are not searched.

    Attachments:
    You must be logged in to view attached files.
    #45378
    Arbron
    Arbron
    Participant

    I solved it, , sorry. It was the limit of results on ajax.

    #45385
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh okay, great 🙂

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.