CM Ad-Changer (CMAC) - Getting Started - Inserting Shortcode to the Theme Template

Inserting Shortcode to the Theme Template

Use the following php code to add a shortcode running your campaign anywhere on your template:

do_shortcode(‘[cm_ad_changer campaign_id="1"]‘);

Ref in here http://codex.wordpress.org/Function_Reference/do_shortcode

To insert the shortcode into a template use the following PHP code:

<?php echo do_shortcode(‘[cm_ad_changer campaign_id="1"] ‘);  ?>

You can also use the following option:

$ads_content =’‘[cm_ad_changer campaign_id="1"] ‘; 
$ads_content = apply_filters(‘the_content’, $ads_content ); 
echo $ads_content;


More information about the CM Ad Changer WordPress  Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center