Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Compact Audio Player shortcode in custom field

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Compact Audio Player shortcode in custom field

Tagged: audio player, Compact Wordpress Audio Player

  • This topic has 5 replies, 2 voices, and was last updated 12 years, 4 months ago by Art Munson.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 16, 2013 at 6:09 pm #8347
    Art Munson
    Spectator

    Will the Compact WordPress Audio Player plugin short code work in single and multiple custom fields on a single post? I tried using it and the button appears in the first instance but does not play. In the other instances the buttons do not display. I am using this in eStore.

    This is a music site where a single post can have multiple versions of the same song.

    Thank you for any help!

    January 17, 2013 at 5:29 am #53092
    admin
    Keymaster

    Hi, The compact audio player has a shortcode that you can use on your post or pages or inside the the description field of a product.

    I am not sure what you mean by “custom fields”? The audio player plugin doesn’t do anything with custom fields.

    January 17, 2013 at 5:46 pm #53093
    Art Munson
    Spectator

    I use custom fields for the MP3 path and multiple custom fields, per post, to render my display of a post. As an example the plug in “Audio Player” will recognize the MP3 path and work correctly in the body of a post but in not if the MP3 path is in a custom field.

    My question is: Will the “Compact WordPress Audio Player” plugin short code (which includes the MP3 path) work in single and multiple custom fields on a post?

    Thank you.

    January 18, 2013 at 12:13 am #53094
    admin
    Keymaster

    I see what you mean. No the compact audio player plugin won’t work with custom fields at all.

    January 18, 2013 at 5:29 am #53095
    Art Munson
    Spectator

    Okay, thanks for the reply.

    Art

    January 18, 2013 at 6:43 pm #53096
    Art Munson
    Spectator

    Okay I found an answer to this problem that I have been chasing for a while. I inserted the following code into my single.php file.

    <?php
    if ( get_post_meta($post->ID, 'your_custom_field', true) )
    echo do_shortcode(get_post_meta($post->ID, 'your_custom_field', $single = true));
    ?>

    Just replace “your_custom_field” with your own custom field name. You will now be able to use shortcodes in your custom field.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ