Social Marketing shortcode in template home.php not working

Hi guys,
I'd like to add a Social Marketing ad in my home.php using the do_shortcode() function to promote a free service. Here's the code I added:
<?php echo do_shortcode('[wdsm_ad id="xxx" class=" "]'); ?>
But nothing happens. I am running WPMU 3.3.1.
I use a hard coded homepage not a static page or post.
Would be great if you can help me out.

Thanks
Robert

  • robaggio
    • Design Lord, Child of Thor

    Hi Timothy,
    yes I am using the shortcode in my home.php template for my homepage.
    The shortcode alone does not work for me, because it's not within the page/post editor.
    Has something changed with WP 3.3.1 and the do_shortcode() function command or is it not compatible with '[wdsm_ad id="xxx"]'?
    I am not really savvy with PHP coding.
    Thanks for your help.
    Robert

  • aecnu
    • WP Unicorn

    Greetings robaggio :slight_smile:

    We have not heard back from you as to the status of this issue.

    If you are still having an issue with this please let us know so that we may try to get you fixed up as soon as possible by choosing to mark this ticket as unresolved.

    This will also bring your ticket up front back in plain view again.

    Joe :slight_smile:

  • robaggio
    • Design Lord, Child of Thor

    Hi Joe,
    I was able to get around the problem by using the Social Marketing widget plus a new sidebar on my homepage. Now the advert displays correctly on my homepage.
    Nevertheless, one problem I noticed by using the SM widget. I can't select additional CSS classes (link and container) when using the widget. Therefore, I only can use one type of advert. This is very limiting and should be changed in a future release of this plugin.
    Thanks in advance

    Robert

  • Laura
    • Design Lord, Child of Thor

    Hi

    Sorry for replying to this old threat, but it is the only one that talks about the problem.

    I wonder if after many months of development is actually possible to use the function:

    <?php echo do_shortcode('[wdsm_ad id="xxx" class=" "]'); ?>

    in the home page without using a widget.

    Thanks

  • aecnu
    • WP Unicorn

    Greetings laura_rodriguez,

    Thank you for your great question and as I can see the lead developer has already made his way in here with a solid answer.

    Regarding the opening of the old ticket, it would be best if you open your own ticket and copy and paste any relative information from the old ticket to the new.

    As you can see this plugin has gone through many changes since this ticket was originally created.

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.