Support » Plugin: WP-DownloadManager » Custom template

  • Resolved Julian Magnone

    (@jmagnone)



    Hi,

    I am using the WP DownloadManager version 1.68.1, so far I was using [download] shortcode once in the post, to offer 1 single download. However, I need to support the following.

    In a single post, offer multiple downloads, the main download and other secondary or alternative download links. I need to highlight the main download (with a button maybe), and provide normal links for alternate links. Would be possible to use a different custom template or specify a different format in the shortcode or any other function provided by the plugin?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Sorry template are global and it applies to all. You can’t choose a custom template =)

    So, no way to override it via hooks, neither?

    Alternatively, could be possible to call a plugin function to get the plain file URL by file ID?

    Regards
    Julian

    Plugin Author Lester Chan

    (@gamerz)

    Nope! There are no hooks for templates because they are designed from the start to be global to keep things simple.

    The URl is simple, http://yoursite.com/download/ID, don’t need any function for the plugin.

    Hooks do not add too much complexity, and helps to make the code much customizable and flexible.

    So far, the way I solved it (to create a custom template based on my needs) is to use add_filter on option_download_template_embedded which will override the saved template.

    Plugin Author Lester Chan

    (@gamerz)

    I agreed! Why not help me out, you can send a PR to https://github.com/lesterchan/wp-downloadmanager with the filter and I will merge it in and of course credit you.

    I would prefix the hook name with “download_”

    Ok, sure. Sounds like a very good idea. I will try to help submitting my changes.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom template’ is closed to new replies.