StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   468x60 Ad Block - Shortcode? (http://www.studiopress.com/support/showthread.php?t=24484)

temporary_saint 03-21-2010 02:34 AM

468x60 Ad Block - Shortcode?
 
I've tried adding a line of shortcode from AdRotate (http://wordpress.org/extend/plugins/adrotate/) into the 468x90 Ad Block from the Lifestyle Theme Option menu.

The problem I'm having is that the shortcode is just being displayed as pure text, for example: [adrotate group="1"]

instead I've had to go in and ad the php code directly into the theme - which works. Does anyone know why WP shortcodes aren't accepted into the ad block or how to make them work (much easier to manage!)?

Cheers!
dale

Debra 03-21-2010 07:05 AM

the sidebar does not accept shortcode, however if you add this to your functions.php right before the closing ?> you can make a text widget accept shortcode

PHP Code:

add_filter('widget_text''do_shortcode'); 


temporary_saint 03-21-2010 02:48 PM

Excellent - will this also enable shortcode for the 468x90 Ad Block (the one between a post and the comments in a blog)?

This isn't a widget, it's the one under SETTINGS > Lifestyle Theme Option menu.

Cheers!
dale

Debra 03-21-2010 03:11 PM

try this to add your shortcode there

PHP Code:

<?php
 
echo apply_filters('the_content''[shortcode here]'); 
?>



All times are GMT -5. The time now is 09:36 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.