Okay, here’s the answer:
function CustomHead() {
include('headcontent.php');
}
add_action('wp_head','CustomHead',1,1);
The key is that first “1”, which sets the priority of it to run at the highest (this is an optional element, defaulting to 10, putting it at the end of the head by default). More info here: http://codex.wordpress.org/Function_Reference/add_action
Related Posts:
- How do I force wp_enqueue_scripts to load at the END of ?
- Add code into on a per page/post basis
- Create mobile navigation header with settings integration
- Headers Content-Security-Policy CSP Major Issue
- Adding Plugin Assets to Header
- How to laod wp_enqueue_style to another header i created my self
- force enqueue script to be first in order of prominence
- How do I make my plugin load before the headers are output so I can redirect wordpress?
- How can I modify what is being output in wp_head, whether by a theme or WordPress in general?
- Change Page’s Tag Using functions.php File
- How can I reduce the amount of files loaded/included per plugin?
- How to load different css file for different pages
- How to remove/hide action links cluttering under specific plugins’ names
- How can I add a custom header to a custom template in a plugin without using the theme folders
- append stylesheet via shortcode
- Change My Basket text in the header of WooCommerce Artificer theme
- How to load plugin before the wordpress jquery?
- How to send “Location” header on plugin form submit event?
- Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages
- Disable wordpress from including jQuery in the head section
- How to add inline css/js inside a shortcode
- Strip HTML comments from plugins in header/footer
- send_headers don’t work on wordpress multisite
- add action wp_head not working
- WordPress Redirect Not Working – AJAX Callback Response Not Picked Up
- Headers already sent when I try to add headers via a shortcode
- Add javascript to wp_head with call to plugin options?
- WordPress repository forbids me call wp-load.php in non-WordPress file
- CSS from textarea in options page to frontend what to do
- Show an image in my header.php
- How to debug error message: Cannot modify header information
- wp_footer hook only working on homepage not in other pages
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Object method calling for global $wpdb in header.php
- What does making sure “that your theme is WordPress header and footer tag enabled” mean?
- Know which plugin is calling JS in wp_head()?
- My single.php page does not show the related data to the post which is clicked
- Enqueue stylesheet in plugin for wp-login.php
- Get ‘Headers already sent’ error for the plugin I am creating when I try to login
- Custom Login Page — wp_signon Headers Already Sent?
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- echo get_option in header template
- wp_enqueue_style on template_redirect level?
- How to manipulate the content within wp_head
- Grab ID from post from plugin and use it to create an object
- Cannot access WP admin because plugin returns 204
- force jQuery to load in the head
- Edit page header on a custom plugin
- How do i ‘deactivate’ a plugin only on a certain page template?
- how would I include some html in the header section of a wordpress plugin? I get an error
- How do I fill the Home Description?
- Hook for plugin to insert into entry-meta
- sliding/fading header plugin or approach suggestion
- How to make a slider hearder?
- is there a way to preload specific images for desktop users only? (excluding mobile users)
- Prevent WordPress from sending set-cookie http header
- i create functions.php in plugin files but add_action (‘wp_head’, ‘function_name’) don’t work
- Loading a plugin in a post template without using wp_head()
- How to change the width of certain paragraph or header blocks?
- Modifying server’s response to API endpoint
- How to fix shifting header after installing speed / cache plugins?
- Cannot modify header information – headers already sent during plugin activation
- Debug in WP backend
- How to overlay a webcomic plugin on top of a header image?
- Set Content-Type header in do_parse_request filter
- How do I override WordPress plugin css [closed]
- Update javascript URL in header – Domain Mapping Plugin [closed]
- Front End Page Not Loading Header Footer
- Primary Menu doesn’t show because of w3 cache
- Insert Plugin on a custom page
- accessibility of an object created in a plugin, from the header
- Best use adding user generated JS/CSS to a theme with a plugin
- Problems with installing and deleting plugins
- Change text “My Basket” in woocommerce artificer theme
- WordPress repository forbids me call wp-load.php in non-WordPress file
- Cannot modify header information – headers already sent by
- Footer option is missing in Customiser
- No Google Analytics code rendered in the header?
- all plug-ins load scripts on all pages
- PM PRO addon package check user access to a specific post
- How to write a specific url for only single page in wordpress?
- How to show random feed from DB and show content in my site
- wordpress or jquery a dynamic photo gallery
- Exceeded the virtual memory limit
- How to add image for custom taxonomy
- Modifying lightbox plugin to allow for quoting, Does this exist? [closed]
- Plugin Beauty Contact Popup Form with while loop
- Build a Boat Form Plugin [closed]
- WordPress Plugin to Show a Website in Different Language? [closed]
- Plugins not showing on dashboard?
- Open all PDF or docx link as iframe
- Get ID of a NextGen album that is linked to a subpage [closed]
- Strict Standards: Non-static method in sidebar generator
- Trying to insert a row from a Plugin
- Developing a Site Like AllTop.COM – RSS Reading Problem
- Like/Dislike plugin crawler problem
- Use a WordPress Plugin in non-WordPress .php page [closed]
- Display Custom Post Type and Custom Taxonomy Data on Front End Using Only a Plugin
- Ajax in wordpress [duplicate]
- How can I get information on who is downloading my plugin? (new to this)