Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7028

    Hello, I am trying to add shortcode into my sidebar using a text widget for a simple button plugin.

    I have followed the steps outlined in this post, but nothing has worked so far : http://www.kriesi.at/support/topic/adding-a-new-shortcode

    The button shows up, but it is stripped of most of it’s styling.

    Any ideas? So far I have test buttons encoded into my sidebar.php as a workaround, but they ignore the stylesheet and dont adhere to the framework of the page/sidebar as if they were properly used in a text widget. This poses headache upon headache as formatting for the page is now a complete chore.

    Also- in the functions.php there is no ?> closing tag. Why?

    thanks,

    Scott

    #56343

    Hey,

    add following code to functions.php (i.e. at the very bottom):

    add_filter('widget_text', 'do_shortcode');

    The ?> is not required at the end of the file that’s why Kriesi skips it.

    #56344

    I am having a similar issue and have added the following code to my functions.php:

    add_filter(‘widget_text’, ‘do_shortcode’);

    add_filter( ‘widget_text’, ‘shortcode_unautop’);

    After adding this, I can see the button created by the shortcode but I don’t see the styling.

    Thanks!

    #56345

    Hey!

    Can you post a link to your website please?

    Best regards,

    Peter

    #56346

    Sure – do you have an email address I can send it to? It is behind a password right now as it is not live yet.

    #56347

    Hi!

    You can send the mail to (Email address hidden if logged out)

    Regards,

    Peter

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

The topic ‘Adding shortcode into sidebar’ is closed to new replies.