You can add html to the site head using this function:
// Add scripts to wp_head()
function add_head_html() { ?>
<!-- html goes here -->
<?php }
add_action( 'wp_head', 'add_head_html' );
But if you’re talking about the html element <header>
(as it sounds like from your edits) it sounds like overcomplicating things, but you might want to look at injecting it with jquery into the right spot using a solution such as this:
https://stackoverflow.com/a/9866637/3387817
Related Posts:
- Generate
- How do you completely remove the default header and footer using functions.php?
- Generating rel=prev and rel=next only on wordpress categories
- Passing a variable via wp_head and then calling it on the page
- adding custom script to functions file
- New custom menu created. how to apply it?
- save_post hook – headers already sent?
- Init hook for header send
- Echo a div to header.php from functions.php
- Remove “Category:”, “Tag:”, “Author:” from the_archive_title
- get_template_directory_uri pointing to parent theme not child theme
- Link to user’s profile settings page?
- Shared functions.php across multiple WordPress websites
- How to restrict actions and filters “properly” by conditions
- Extending auth_cookie_expiration based on user role
- Check if the user has explicitly set an excerpt
- AJAX handler throws 400 (Bad request) – why?
- How to customize search result page title?
- Create new user without password
- How to style current page number (wp_link_pages)?
- Stripping shortcode from custom excerpt function
- Display the number of user comments
- Issue adding text after short description on product pages Woocommerce [closed]
- Custom function for user register in wp?
- Allow latex in wordpress excerpt
- Child theme functions.php not executing
- How to add background image control to page admin controls?
- Call function without having to wait on response
- Retrieve post modified date for specific post by post ID
- add a function to submit options.php
- Is it better to assign functions like get_the_id() to a variable if it’s used multiple times?
- is_user_logged_in not working to redirect only logged out users
- How to extract the variables out from “add_shortcode” function?
- wp_is_mobile dequeue not working
- Loading CDN that requires jQuery in WordPress
- Previous_post and Next_post – Custom Post Type
- Creating a child theme – functions.php code issue
- Only let plugin add actions to wp_head & wp_footer on single posts
- Setting Up Scheduled Tasks (For Scripts to Run)
- problem with has_post_thumpnail in foreach loop
- Find resources dynamically loading and change or add to the url
- Using shortcode content with nested shortcode
- Function wont fire after custom post type is updated
- Removing custom meta data
- how can I edit flexslider in woocommerce. [Urgent]
- Conditional Gravity Forms filter in WordPress Multisite
- When a user logs in, how can they view the website instead of the admin menu?
- WordPress Page Restrict
- Do we have to use ftp to recover from a bad functions.php edit?
- current_time(‘timestamp’) seems to be different from the real current time
- How to get_template_directory() properly on local environment
- the_posts_pagination() function returns missing page numbering on some blog pages
- content editor format style tags
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Missing argument for the function
- Does size of a theme’s functions.php file matter?
- How to add custom user avatar in wordpress
- custom functions in function file delete automatically daily
- Init action and refresh page after form action
- Replace plugin function with a custom function?
- Delay a function, any function!
- Combine two active_callbacks into one on theme customizer
- How to create shortcode with html and php content?
- Fill empty custom field with other custom field
- Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?
- How do I find the code executed when wp_head() is called?
- Problems with functions.php! Error! [closed]
- Editor cannot access Theme Options
- Is this a backup door?
- Include widget file in functions.php of child theme
- Need help making a short code work
- Is there a function for setting a password to a post?
- WordPress functions.php conditional include another functions file
- reWrite wp-content url to point on my cdn
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- sort title descending with title with number
- Add #primary at the end of navlink permalinks on single posts
- Author social media aren’t shown on the page
- Is there anyway to force is_singular() to be true when not loading template?
- Postback redirect through add_action is not triggered
- get_comments not working properly after WordPress v4.4 update
- Retrieve a custom form field modified by a filter
- What add_action reference should I be using or should I use do_action?
- Allow the access over wp-login.php
- Create input select image URL?
- Including one page with WordPress functions into another
- Dynamically Generating User Meta Field
- Check if there is an post to be published in future
- Unhook the comment form in Buddypress
- Code in functions.php appearing on front-end and dashboard [closed]
- is_preview() always return false
- Sessions in word press [duplicate]
- “woocommerce_output_related_products” not working
- User’s Comments Number: Storing it in a meta field for different uses
- Show one post per author and order by custom field
- Text before price on WooCom
- Warning: call_user_func_array() expects parameter 1 to be a valid callback
- Change Post status based on custom field date +1 day
- How to add height and width dimensions automatically to archive descriptions
- How to store page-{id}.php templates in custom folder