• Hello

    For any experts out there. When ever I apply my shortcode tags, they dont seem to work. Instead I just see the text “[example shortcode]” and thats it.

    If you could help it would be much apprciated

Viewing 6 replies - 1 through 6 (of 6 total)
  • Depends where you are trying to apply them? Widgets, inside theme template files, post/pages etc?

    For example to make them work directly from within theme code you need to use the do_shortcode() function:

    http://codex.wordpress.org/Function_Reference/do_shortcode

    Thread Starter art42

    (@art42)

    Hi and thank for getting back to me.

    I’m trying to make them work on a Page, I’ve placed it in the HTML yet no luck.

    Am I right in saying that I will need to put the following instead;

    do_shortcode(‘[example shortcode]’)

    You need to have something like:

    <?php echo do_shortcode( '[example shortcode]' ) ?>

    Thread Starter art42

    (@art42)

    Thank you again for gettng back to me.

    I place it into the site and i still get nothing.

    This is a theme which i put together my self. If it possible that I may have missed out some important coding regarding the matter?

    Probably something to do with the shortcode function itself. I would suggest you get the shortcode working so that you can add it to a post/page easily (i.e. in the editor).

    Then after you confirm it is working you can use the do_shortcode() function to add it to your page template code.

    more concrete details please:

    do you insert the shortcode into the content of a page?
    or into a page template?
    what is the code of the shortcode (probably defined in functions.php of your theme)?
    link to your site to illustrate this problem?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Shortcodes’ is closed to new replies.