Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • AJ Tatum
    Participant

    So, I’m using shortcoder to build a video player using Plyr. With Plyr, you can pass in multiple sources. So, for example, a m3u8 file, a high resolution mp4, medium resolution mp4, and low resolution mp4. However, there might not always be all four of those. Rather than building four different shortcodes, I was curious if it was possible to do something like:

    if %%m3u8_URL%% then
    <source src="%%m3u8_URL%%" type="application/x-mpegURL">
    endif

    Please let me know.

    Thanks,
    AJ

    Hi Aj,

    Thanks for using Shortcoder. Since shortcoder plugin is designed to create “shortcodes” for huge text/HTML/script/CSS there is no option to provide dynamic content.

    The reason is that, allowing such functionality is basically creating a programming system. Advanced users can create a shortcode manually using PHP with such logic.

    I would suggest users create a shortcode manually with PHP with full control over the content. Below are some docs regarding the same.

    https://wordpress.stackexchange.com/a/172920/3914

    How to Add Custom Code in WordPress with Site-Specific Plugin?

    Hope this is helpful 🙂

    Thanks,
    Aakash

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

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter