Thanks to @kero I have implemented this code:
<?php echo do_shortcode('[responsivevoice voice="Italian Female" buttontext="Ascolta"]'.'<br>'.$bodyContent.'[/responsivevoice]'); ?>
The $bodyContent variable contains the HTML value of the article’s body, obtained using this function: http://www.web-templates.nu/2008/08/31/get_the_content-with-formatting/index.html
<?php $bodyContent = get_the_content_with_formatting(); ?>
Related Posts:
- Adding short codes from a page’s content on header and hiding the same from page’s content
- Error do_shortcode In WooCommerce Template
- Print shortcode in defined area
- Adding a template part as part of a shortcode
- When are Shortcode Attributes Available in Template
- Getting Shortcode Attributes befor content is displayed by the template
- my form does not insert any data in the database
- Use atributes of shortcode in get template part
- Shortcode or Template Page
- Using shortcodes that wrap around code
- Create a shortcode to display the “the_content ()” in my post [closed]
- How to create a shortcode with 1 parameter (atts)
- Return HTML Template Page with PHP Function
- shortcodes output before content [duplicate]
- WordPress adds br in between my shortcode
- Shortcodes, HTML tables, and multiple rows
- WP_enqueue_script inside shortcode?
- Shortcode to Gutenberg-block: additional text on front-end and conditional display
- How navigation works in custom loop within shortcode?
- I dont want to show shortcode in tag
- WordPress shortcode doesn’t working on HomePage
- Can’t understand $atts in functions?
- Add attribute to shortcode dynamically
- Execute shortcode twice in the same page
- How to parse this shortcode?
- Add custom setting that uses radio button to WP Gallery
- Shortcode with hyphen doesn’t work
- Shortcode parsed incorrectly because of heredoc
- Shortcode “post_per_page” not working
- Shortcode is running in page editor
- Creating shortcode with parameter
- Video Shortcodes not working in WordPress
- Shortcodes won’t work on live environment
- Create shortcode in Child Theme?
- Get post object in shortcode function
- How to insert image and text from admin panel throughout my theme
- Create a short code to display a specific loop
- How to add shortcode to HTML file (not showing on website)
- Custom Shortcode: define cursor position/insertion point?
- Buddypress shortcode for tabs [closed]
- show shortcodes in editor
- Using shortcode in template file
- Image Shortcode from ACF ID
- Page code showing in WP Dashboard
- echo do_shortcode just prints the shortcode name and not its content
- How to create a shortcode with html and php code
- PHP Running On CMS Side of WordPress
- Insert shortcode between ”
- Where to find the code used to render a page that has a shortcode and a template defined?
- Create a shortcode to use in visual editor
- do_shortcode doesn’t work on some pages
- Custom youtube shortcode that uses $content
- How to build dynamic pages?
- How to reload the shortcode content when the database is changing
- Best way to include reusable sections in page content
- Regenerating WordPress shortcodes based on value with AJAX
- Custom shortcode to display posts, first post is full
- How to use template inside plugin shortcode with variables for big HTML code
- Form shortcode with multiple options as attributes
- How to add data attributes to the wordpress audio shortcode
- Beginner’s question about shortcodes
- How to create a dropdown of shortcodes in edit mode for posts
- Multiple instances of the shortcode on the same page
- Shortcode from admin textarea to page
- get data with shortcode
- Replace shortcode with output in database?
- Wrap php in shortcode
- Adding my own custom woocommerce shortcode to child theme, how?
- Excerpt Length & List Category Posts Plugin
- Iteratively add sub shortcodes to php array
- Show shortcode only in posts
- How to execute a shortcode?
- Shortcode, Concatenating & Parse error: syntax error, unexpected T_FOREACH
- How to remove double quotes in a shortcode?
- Shortcode to appear and show the date not code in Title and description of my website
- Colon is Missing In My Website Url in WordPress Shortcode
- Shortcode not working inside div html
- Multiple shortcodes with embedded JavaScript code in same page, how?
- Contact Form 7 shortcode is commented out, but I receive spam emails from it
- How can I disable(remove) wpautop (wptexturize, convert_chars) for specific shortcodes only?
- How to load specific template page in a custom shortcode
- WordPress keeps automatically inserts
- shortcode is not rendered
- nested shortcodes from different plugins. too complex? [duplicate]
- Contact form code not working. Need help!
- How to make shortcode enabled in JSON Feeds?
- How to add a shortcode to an HTML image tag
- Automatically add class-attribute to gallery?
- Shortcode works from functions.php but not from included file
- Why can’t I type [ ] opening and closing brackets on the Visual tab?
- Video Shortcode Only Returning a Link
- Members only Passthrough
- Shortcode to output get_header not working
- How to add a nested shortcode into editor?
- load plugin with ajax [duplicate]
- Can not get shortcode content in function
- Applying if (get_post_meta) to new shortcode
- Add widget/shortcode to sidebar OUTSIDE of the theme
- How to remove https:// from shortcode generated url
- How to enable on custom shortcodes