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?
add following code to functions.php (i.e. at the very bottom):
The ?> is not required at the end of the file that’s why Kriesi skips it.
I am having a similar issue and have added the following code to my functions.php:
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.
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.
The topic ‘Adding shortcode into sidebar’ is closed to new replies.