WordPress.org

Ready to get started?Download WordPress

Forums

ShortCodes UI
[resolved] Using shortcodes on Themes (5 posts)

  1. DivinoAG
    Member
    Posted 2 years ago #

    Is is possible to use shortcodes created with ShortCodes UI on my themes? I'm trying to include some shortcodes with the following code:

    <?php echo do_shortcode('[featured-link]'); ?>

    But when I look at the HTML page, WordPress is echoing [featured-link] instead of the content of my shortcode. Is there anything in particular I need to do, or are the shortcodes created not compatible with themes for some reason?

    http://wordpress.org/extend/plugins/shortcodes-ui/

  2. Marventus
    Member
    Posted 2 years ago #

    Hi,

    the plugin documentation mentions short codes can be called as template tags. Have you tried that?

  3. DivinoAG
    Member
    Posted 2 years ago #

    Hello,
    I see a mention of that on the Features list, but no actual documentation on how to do it, and the video also doesn't say anything about it; I would assume that it is what I was doing. Do you know how that works?

  4. Marventus
    Member
    Posted 2 years ago #

    Try this:

    <?php featured-link(); ?>

    If it doesn't work, try echoing it:

    <?php echo featured-link(); ?>
  5. Bainternet
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    the shortcodes are just like any other shortcode in WordPress which means that using :

    <?php echo do_shortcode('[shortcode_tag]'); ?>

    should , and does work just fine, make sure that your shortcode tags is set correct.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic