I need to add this piece of code right before my wp_head();
call using PHP because the code has to execute server side. Hooking the code into my wp_head();
does not work. I need to add it right before. Here is the PHP code to be added.
gravity_form_enqueue_scripts(1,true);
Here is where the code needs to be inserted:
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
gravity_form_enqueue_scripts(1,true);
wp_head(); ?>
The code should not show on return to browser. How do I add this PHP snippet to this exact location dynamically?
I actually needed to :
not
I turns out I just needed to find the right hook to add_action to.