• My site’s search results link to WPDM Single posts. I would like for the user to go directly to the PDF file when they click the link from the search results page. How can this be done?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @matt6303

    Thank you for writing to us.

    To achieve your referred requirements you have to modify the related link template by following this instruction: https://www.wpdownloadmanager.com/doc/template-files/.

    In the related template file, please use the [download_url] template tag which should go directly to the PDF file.

    You may check our documentation for more details: https://www.wpdownloadmanager.com/doc/templates/template-tags/.

    With Regards

    Thread Starter Matt Scheidler

    (@matt6303)

    Thank you for the reply. I am familiar with creating custom templates. In this case I’m trying to change the Search Results page:(https://domain.com/?s=term) It is the links in these search results that I am wishing to change. Is there a WPDM template that controls the link when the output is a search result?

    Hello @matt6303

    Thank you for your response.

    To provide you with accurate information can you please let us know which links in the search result page you are referring to?

    It will be very cooperative if you share a screenshot about it.

    Regards

    Thread Starter Matt Scheidler

    (@matt6303)

    Thank you for the reply. Sorry if my question was not clear.

    With some help from Relevanssi support I am creating my own URL in the format '/download/?wpdmdl=' . $post_id and then building a custom loop in the search.php template to use this URL instead of the default result (the link to the WPDM single post) when the post type is wpdmpro.

    Now that I have this in place, I do have a follow-up question. Within your templates, there is a “refresh=” query parameter on each link. What I have done does not include this in the search results. Do I need to have this on these custom-built links, and if so what’s the best way to do it? Thank you.

    Hello @matt6303

    Thank you for writing back to us.

    Well, the refresh query parameter is not required and you can omit this in your related template.

    With Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Search Results – link directly to the file’ is closed to new replies.