Remove adjacent_posts_rel_link under 3.2?
Answer: the change in 3.2 is from adjacent_posts_rel_link to adjacent_posts_rel_link_wp_head
Answer: the change in 3.2 is from adjacent_posts_rel_link to adjacent_posts_rel_link_wp_head
What you should do: Read Where to put my code: plugin or functions.php? and apply the lessons to your theme. Themes are for presentation only. Remove everything not related to presentation: do not touch link and meta elements in the header. That’s plugin territory. Remove redundant code. add_theme_support(‘menus’); is not necessary, if you call register_nav_menus(). … Read more
How to modify default controls in WordPress theme customizer
wp_footer hook only working on homepage not in other pages
Adding Shortcode Values to wp_head
How to disable/enable specific plugins for a mobile theme?
Check the type of the queried object on the page and the post type: function function_that_returns_js_string() { $obj = get_queried_object(); $type = is_a($obj,’WP_Post’); if (true === $type && ‘post’ == $obj->post_type) { echo ‘your string’; } } add_action(‘wp_head’, ‘function_that_returns_js_string’); However, I am concerned that you are inserting a script directly into the head of the … Read more
It sounds like you’re trying to implement a general purpose field for users to enter any kind of tracking code/JS into. This approach gives users the most flexibility but it means that you are trusting them to put whatever JavaScript that they want into the header and footer. By default, users need the administrator or … Read more
wp_head function not outputting
If your theme is any good it will have the wp_head hook in header.php. In your child theme’s functions.php you can add an action to include anything you want. Like this: add_action (‘wp_head’,’wpse359909_add_gtm’); function wpse359909_add_gtm () { echo ‘whatever code you want to add’; }