• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

QUESTION Defining Custom Location

Messages
4
Likes
0
Points
1
#1
Hi,

Is there any way to define custom location other than header or footer to insert there?

For example, my customer wants to add some scripts right after <head> tag. So, looking for defining custom hook like wp_head() or wp_footer to add scripts in here to add scripts in here.

Thanks.
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#2
Hello.

The plugin uses the wp_head hook to execute a snippet in the header. You can use any hooks in the snippet code that are executed after wp_head
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#4
You can use do_shortcode()
 
Messages
4
Likes
0
Points
1
#5
I already using the do_shortcode() function. But I need to define each snippet as short code in the header.php when I add it on Woody Snippet at Wordpress admin. Also, I have to remove the short code definition on the header.php if I disable the snippet on the Woody Snippet from the Wordpress admin panel. It's becoming hard to manage.

So, instead of this, if there is a constant hook on custom location and if I able to pick it from the Woody Snippet it would be great.
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#6
There is no such location in the plugin interface, since there is no such hook in Wordpress. You can use In header. Then the code will work in <head>