我需要在wp_head();
使用 PHP 调用之前添加这段代码,因为代码必须在服务器端执行。将代码挂钩到我的wp_head();
不起作用。我需要在之前添加它。这是要添加的 PHP 代码。
gravity_form_enqueue_scripts(1,true);
这里是需要插入代码的地方:
<?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(); ?>
返回浏览器时不应显示代码。如何将此 PHP 片段动态添加到此确切位置?