Take CSS from shortcode and insert into
-
This seems like such an easy answer, but I can’t find it and I’ve been googling for it all day.
I have a need to take some attributes from my shortcode and insert them into a <style> tag. I have an XHTML 1.0 template and want to assume that others who would use this plugin would also use XHTML. Since XHTML dictates that <style> needs to remain in the head, this means that I need to take attributes from the shortcode and insert them into the head.
So, in order to insert something into <head> I need to call add_action(‘wp_head’, ‘my_function’). However, it’s my understanding that this gets called before the shortcode gets processed.
So, how can I accomplish this? How do I take shortcode attributes and, ultimately, use them in <head>?
The topic ‘Take CSS from shortcode and insert into’ is closed to new replies.