Insert shortcode between ”

just use <?php echo do_shortcode(‘[YOUR_SHORT_CODE_HERE]’);?> For more information: Short-code in code file $cb_byline=”<div class=”cb-byline”>” . $cb_author . $cb_date . $cb_cat_output . $cb_comments . $cb_post_views . do_shortcode(‘[YOUR_SHORT_CODE_HERE]’). ‘</div>’; } For Plugin “I Recommend This” : <?php if( function_exists(‘dot_irecommendthis’) ) dot_irecommendthis(); ?>

How to create an incremental list using shortcodes?

What you want is to use shortcode attributes. I Googled “wordpress shortcode attributes” and found the sample code below in the WP Codex // [bartag foo=”foo-value”] function bartag_func( $atts ) { $a = shortcode_atts( array( ‘foo’ => ‘something’, ‘bar’ => ‘something else’, ), $atts ); return “foo = {$a[‘foo’]}”; } add_shortcode( ‘bartag’, ‘bartag_func’ ); You … Read more

Shortcodes in RSS excerpts

I tested following code and it worked just fine for me: function my_name_shortcode( $atts ) { return “<h3>PRASAD</h3>”; } add_shortcode( ‘name’, ‘my_name_shortcode’ ); add_filter( “the_excerpt_rss”, “do_shortcode” ); The result can be seen in below screenshot.

Shortcode outputting at top of content

This happens when there is echoed output from the shortcode rather than the result being returned… I’d wager nt_course_note_entry_field likely echoes rather than returns. If there is one – or you can create one) – use a similar function like nt_get_course_note_entry_field that does not echo. If you can’t change the function you can wrap it … Read more

PHP Running On CMS Side of WordPress

Even with the missing open php tag, this won’t work the way you’re trying to do it. The Divi code module accepts html code and PHP shortcodes. I haven’t tried javascript, so not sure about that. You’ll need to integrate your code as a stand alone plugin. After that, you can use the shortcode in … Read more