WordPress.org

Ready to get started?Download WordPress

Forums

Shortcodes Ultimate
[resolved] Using Shortcodes inside theme (5 posts)

  1. AMGCAT
    Member
    Posted 2 years ago #

    Hello,
    thank you for this great plugin.

    I have to add a box at the bottom of my posts, more than 600. Its going to be hard doing it manually so I wonder If i can put the shortcode box inside a template file.

    I have been using this but it does not work. I am not very good with code. :)

    <?php
    $my_box = '
    [gn_box]
       [gn_box title="Rectificación de datos" color="#f00"] blabla bla bla bla bla  and then a link inside shortcode <a title="Contacto" href="http://www.example.com/page/">enlace </a> [/gn_box]
    [/gn_box]
    ';
    echo do_shortcode( $my_box );
    ?>

    I have been using my_box as I see another post relating to this that was using my_tabs for the shortcode.

    Thank you

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

  2. Vladimir Anokhin
    Member
    Plugin Author

    Posted 2 years ago #

    Hello AMGCAT,

    try this code:

    <?php
    $my_box = '[gn_box title="Rectificación de datos" color="#f00"]blabla bla bla bla bla  and then a link inside shortcode <a title="Contacto" href="http://www.example.com/page/">enlace </a>[/gn_box]';
    echo do_shortcode( $my_box );
    ?>

    Also, with this code you need to enable Compatibility mode at plugin settings page.

  3. AMGCAT
    Member
    Posted 2 years ago #

    Thank you for your message.

    It works !!

    This code is going to work with all the shortcodes ?

    changing the name of the shortcode of course

    Thanks again, great plugin.

    Great Support!!

  4. Vladimir Anokhin
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, this code works for all shortcodes

  5. AMGCAT
    Member
    Posted 2 years ago #

    Thank you!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic