Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7179381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:07:43+00:00 2026-05-28T17:07:43+00:00

I have downloaded an audio player plugin for WP. the syntax is very simple.

  • 0

I have downloaded an audio player plugin for WP. the syntax is very simple. You just add the line : “[audio:my_file.mp3]” to your post editor/excerpt, and call it in the loop with the_content() or the_excerpt() respectively.
I would like to build a metabox in which the user would upload a file, and the plugin syntax would automatically be generated accordingly. I know how to insert the meta-data into the DB, but pulling it with get_post_meta() or the_meta() just gets the syntax as it is, without replacing it with the desired plugin content (i.e the audio player).
I thought about dynamically injecting the syntax to the editor\excerpt with the use of the filter default_content but this filter only applies to normal posts, whereas mine is a custom post type (audio).
your ideas are most welcomed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:07:44+00:00Added an answer on May 28, 2026 at 5:07 pm

    Solved. used the_content filter, which allows you to inject content directly from the code:

        function inject_audio_plugin_syntax($content) {
        global $post;
        if ($post->post_type == 'audios') {
        $mf_plugin = get_post_meta( $post->ID, "mf_plugin", true );
        return $mf_plugin;
        }
        return $content;
        }
    
        add_filter('the_content', 'inject_audio_plugin_syntax', 0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded some sample source codes, modified them and made a audio-video player.
I have been working on a jquery plugin that uses a HTML5 audio player
I have an audio player and I want to show the current time of
I have an mp3 on an apache server. I want it to be downloaded
I have downloaded two .mov files from internet and add it to resource folder
I want to add a html5 audio player to a page on my website,
I would like to have nice player in the iPhone. The source is audio/video
I have the following file: /home/user/public_html/web-site.org/download/audio/1999/01-03 Good News.mp3 The problem is that the error
I have the following code header(Content-Description: File Transfer); header('Content-Type: audio/mp3'); header(Content-Disposition: attachment; filename= .
I am trying to add a player that will play audio on the site.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.