You are missing multiple single quotes around $a[url]
, so after src="https://wordpress.stackexchange.com/questions/350229/
there should be a” and after $a[url]
there should be another single quote, and you also need to quote the array key, so the whole return line should be
return '<audio class="listen" preload="none" data-size="250" src="' . $a['url'] . '"></audio></div></div>';
Related Posts:
- How do I use Shortcodes inside of HTML tags?
- Retrieve multiple values passed to a single attribute in a shortcode
- WordPress Shortcode and Dynamic CSS
- Display a text message if the shortcode is not found?
- How to use a frontend URL with a Plugin
- Loading page template into shortcode
- My shortcode is showing up twice
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- How to display a value from a radio button in the options menu in wordpress
- Making Quote Plugin more efficient
- Placing raw HTML inside a WordPress shortcode
- custom shortcode will not display the wrapped content
- Shortcode content output but not in correct place
- Append HTML Using Shortcode
- Plugin CSS not enqueing
- How create a Shortcode with hover and complex options
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Using ob_start and ob_get_clean with wordpress shortcode
- WordPress shortcode returns the data before
- How to Schedule Cronjobs for start of every month and year
- Handling PHP/HTML inside the output of a shortcode function
- Action Hook Inside WordPress Plugin Shortcode
- Calling PHP Titles inside Javascript Markup
- What is the difference between Null vs Empty (Zero Length) string?
- Shortcode displaying at the top of the page [duplicate]
- How to Create custom block for displaying information in content section which act like shortcode
- Shortcode in Shortcode/HTML Graphics and Pictures
- couldnt show short code atts in category
- Drop down question
- Display a custom name when the user has no name settle in his account
- How do I disable cache for a certain page?
- How can I edit the final HTML structure of the whole web page
- overwrite wordpress gallery with custom gallery shortcode
- Problem with my Login Plugin
- How can I create a shortcode from an html and php code written together
- Shortcode Works for Logged in Users but Not Working for Guest
- Show contact 7 form in popup
- using a shortcode in a hyperlink
- Is there a better way to output HTML as a shortcode?
- WP Custom tables query
- Custom plugin with shortcode not working
- How to access function from outside of a class within this class in WP plugin?
- WordPress automatically adds tags when pasting code, how to stop it?
- Add HTML Attributes To Anchor Tags In `wp_list_categories()` Function
- Hiding WordPress Plugin Source Code
- Autogenerate shortcodes from an array of strings
- How to limit the content coming from wordpress shortcodes?
- How can i display post loop in table format?
- How to return a foreach inside a shortcode
- Page Reloads Before AJAX Request Finishes
- How to only show page id as body class?
- action hook wp_head higher priority as all other plugins/hooks
- How do I add text in a shortcode?
- How to Insert Shortcodes into Theme?
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- How can I get content inside one shortcode to another shortcode?
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- PHP can I add line numbers to file_get_contents()
- Template part inside shortcode, unexpected reult
- Slide in Panel WordPress Post
- Shortcode Inside Class Not Working
- Add htaccess rules with insert_with_markers at beginning of htaccess
- How to call function at the bottom of post using plugin?
- is_page “range” for if statement?
- Correct syntax to html php conversion
- How to restrict wp generate attachment metadata() to certain intermediate image sizes
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- An unwanted inline style is added to my body tag
- How can I generate random numbers inside my shortcodes on each implementation?
- How to properly insert a link to a template in WordPress?
- Insert array data on plugin activation
- Will simple function names in a class structure conflict with other plugins?
- Do my defines need to be unique?
- Upload Image in a WordPress page using PHP
- WordPress php filter admin_body_class not working
- Show post in slider
- PHP code inside shortcodes
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Use WP_Query in shortcode
- Shortcode API: How to get name that matched shortcode RegEx?
- Instantiate class to be available to all plugin functions
- Removing unneccessary p-tags (Not every p)
- Common abstract class for plugins
- How to trigger $_GET request within admin plugin page?
- How can I hide Home in my menu in a specific page?
- WordPress automatically adding html tag around PHP code
- How can I get WordPress to save comments in markdown format?
- Shortcode content filter?
- Missing sidebar parameter “fix” – before_content
- How to test nonce with AJAX – Plugin development
- What does $wpdb->get_row return?
- Create shortcodes within foreach loop (using array)
- How Display Posts on category
- How to get the POST TITLE using the POST ID?
- WP add_action factory
- wp_loaded hook block script enquequing
- WP nonce invalid
- Custom Theme, Custom shortcode not working
- HTML tags in bloginfo description
- woocommerce subscriptions – get expiration date [closed]