if custom tag is in the_content add javascript
-
I’m trying to add javascript to a page that has at least one of a custom tag, but what I’m doing isn’t working:
if( preg_match_all("/(\[rbg_play_video.*?\])/", 'the_content', $matches, PREG_SET_ORDER) != 0 ) { wp_enqueue_script("swfobject"); }
This is at the top of a plugin script, and pretty much all there is to it so far. Any help or advice?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘if custom tag is in the_content add javascript’ is closed to new replies.