[wp-hackers] Selective CSS based on Shortcode?

Andrew Nacin wp at andrewnacin.com
Wed Jan 27 08:49:06 UTC 2010


I would read through this wp-hackers thread:

http://lists.automattic.com/pipermail/wp-hackers/2009-October/028143.html
http://lists.automattic.com/pipermail/wp-hackers/2009-October/thread.html#28143

On Wed, Jan 27, 2010 at 3:32 AM, Matthew Kettlewell <ceo at kettlewell.net>wrote:

> I'm wanting to override CSS in posts that use a shortcode from my
> plugin....
>
> problem is that I'm not sure how to go about doing this...
>
> I'm using add_shortcode() to check in the post contents for the shortcode,
> but I'm needing to know if the shortcode is used when I'in in header.php.
>
> I've tried setting meta_data in my function that is called from
> add_shortcode(), but it's too late...
>
> Is there a way to get the shortcode value before header.php is called?
>


More information about the wp-hackers mailing list