• Hello again Akash, Hope you are doing good.

    Need your help setting up few things.

    1. what is the shortcode parameter to get audio url which ends with .mp3 ?
    (it should be displayed below audio player)
    Example Url: https://domain.com/wp-content/uploads/2022/11/xyz-track-name.mp3

    2. Is there any possibility to display parent post url ? if so please help me with the code.

    3. Is there anyway possible to display child attachements like if i have attached 3 audios to post X, Y and Z. if X audio(attachemnet) is opened it should display remaining attachments of same post that is Y and Z. Similarly if i open Y, It should display other 2.

    4. How to auto place specific shortcoder inside description box of every attachement automatically ?

    5. Even though you answered this question before still want to ask again, if 2+ shortcoders is used in 10,000+ posts where 100’s of user browse simultaneously, will it have any impact on server or any other resource? shortcoder is used only to diplay 1 line paragraph and download link to audio attachement files.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi @bgmsquad,

    Answer for 1-3) Shortcoder is useful if you want to create shortcodes for frequently used static HTML.

    It does provide some basic variables like post URL, ID etc. They cannot be used to do some programming.

    You can however insert custom parameter and change it’s value like this – https://www.aakashweb.com/docs/shortcoder/custom-parameters/

    Anything beyond this requirement, you might have to work with the PHP and use WordPress functions to pull any advanced data you might need for your idea.

    4) You can place any shortcode (not only shortcoder) in any area which accepts shortcodes. I’m not sure about “description of attachment” in specific. Shortcoder is a plugin which creates shortcodes for HTML/CSS/JS. Please ensure whether that field
    can execute shortcodes. If it does not execute shortcode, then you might check with the theme/plugin developer to use the do_shortcode function – https://developer.wordpress.org/reference/functions/do_shortcode/

    5) It won’t have any impact. The plugin uses WordPress APIs to load the shortcode just like how normal posts are loaded. A page loads the shortcode data only once on a page. It does not matter in how many posts, a shortcode is used. There were no reports of slowness reported with the plugin installed.

    Thanks,
    Aakash

    Thread Starter bgmsquad

    (@bgmsquad)

    Thanks for replying.
    Just wanted to know if there any parameter to show mp3 url just like how it showing featured image url using $$post_image$$

    Plugin Author vaakash

    (@vaakash)

    Hi,

    The mp3 URL you mentioned is not a default WordPress post property.

    You can put the mp3 URL in the post’s custom field and pull that field using the custom field parameter – https://www.aakashweb.com/docs/shortcoder/shortcode-parameters/#custom-fields

    Thanks,
    Aakash

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help with attachment url and parent post url’ is closed to new replies.