[wp-hackers] Selective CSS based on Shortcode?

Eric Marden wp at xentek.net
Wed Jan 27 19:45:18 UTC 2010


On Jan 27, 2010, at 2:32 AM, Matthew Kettlewell wrote:

> I'm wanting to override CSS in posts that use a shortcode from my
> plugin....


Is the shortcode being replaced with the CSS you want to override? It  
might be easier to set a custom field, check for that in the theme,  
and then apply the CSS in the <head> instead of in the body of the  
post. You can even add a custom metabox with a form control for this  
if you want to make the UI nicer to use (i.e. a radio button for true/ 
false). Metaboxes store the data just like they do in custom fields.



- Eric Marden
__________________________________
http://xentek.net/code/wordpress/
tw: @xentek






More information about the wp-hackers mailing list