1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help on calling shortcodes

Discussion in 'PHP' started by Boris_Badenoff, Apr 27, 2013.

  1. #1
    I am using a plugin that creates post via shortcodes. I want to call one of the shortcodes in my main index template. I am trying to call like this:
    <?php echo do_shortcode('[SalePrice]'); ?></p>
    but it doesn't seem to work. Can you share any experience you might have on this?
    Boris_Badenoff, Apr 27, 2013 IP
  2. merlin77

    merlin77 Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    Could be the shortcode is not being interpreted by wordpress. Try this and see what you get -

    <?php echo apply_filters( 'the_content',' [SalePrice] '); ?>
    merlin77, Apr 27, 2013 IP