This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

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

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45326
    ArbronArbron
    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.

    #45328
    ArbronArbron
    Participant
    #45342
    Ernest MarcinkoErnest 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.

    #45347
    ArbronArbron
    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 MarcinkoErnest Marcinko
    Keymaster

    Sure!

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

    #45357
    ArbronArbron
    Participant

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

    #45358
    Ernest MarcinkoErnest Marcinko
    Keymaster

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

    #45376
    ArbronArbron
    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.

    #45378
    ArbronArbron
    Participant

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

    #45385
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Oh okay, great 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.