Got it working. I had to call the function in my page where I want it to work, the method of doing so is here: https://developer.wordpress.org/themes/functionality/custom-headers/#displaying-custom-header (link provided by Jacob Peattie) and it needs to be within the tags rather than simply a div with an id of site-header.
Related Posts:
- Reposition WooCommerce breadcrumb outside of wrapper content
- Display all values of custom a field created with ACF on a page
- How do I directly access a PHP file located in my themes folder?
- wpdb::prepare was called incorrectly
- WordPress the_content() return only one image from a specific category
- count number of user comments with a specific comment meta value
- How can I access the “description” of a menu item?
- Display all posts in current category
- How do I know what variables are passed in a filter/action and what their meaning is?
- Remove “Remember Me” from login form
- Is it possible to use the featured image of a page as a css background without inlining?
- Wrap each shortcode in array to div
- How can I change WordPress domain from remote to localhost?
- Notify WordPress Site I Have Linked To Them
- Warning: array_pop() expects parameter 1 to be array, boolean given
- Woocommerce filter cart and category specific quantity [closed]
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- items_wrap not working
- Problem adding class to body_class
- Shortcode API: How to get name that matched shortcode RegEx?
- Using shipped version of jquery
- Swapping wp_dropdown_categories function with wp_category_checklist
- How do I Add HTML to the_excerpt() & the_content() Output?
- Is there a way to programmatically create multiple pages utilizing the same template but different content from a json file?
- What’s the uses of wp_cache_set() or wp_cache_add()?
- Create Page To Count Comments For Each Post In WordPress Site
- Why my image upload button is not working in wordpress widget area?
- How does wp_enqueue_scripts work?
- Problem with login form
- Use of wp_insert_post and parameters
- WordPress theme options error
- How would an if statement surrounding a custom field with two variables (holding values) look like?
- get_the_title() gets printed out twice
- Moving code from theme header to functions.php
- What does this mean in wordpress? Easy question
- Woocommerce Email attachments not working – file not being attached
- Best way to use a large array in function
- AJAX button action in foreach
- Add Codepen animation as Preloader to WordPress
- Ajax button not working
- Get categories names as an array to use it in theme settings
- register_setting & add_settings_error validation issues with multiple fields
- WordPress wp-admin redirect and exception
- Use $wpdb or other PHP script method to find/replace in WP database
- Validate and Sanitize WP REST API Request using WP JSON Schema?
- Function Reference/human time diff for future posts
- export a mysql table to csv with column headers
- Override index with a custom PHP page
- How do I correct the code in php? [closed]
- Dynamically adding filters
- Reusable code that I can store in the function.php and apply to other templates as need. Dry Code
- Comment_author_url doing nothing
- How can I tell which of my pages are single-view pages?
- Menu not styling. New menus functionality giving me a headache
- Get category id when SEO URL is turned on
- Customizer control save then return to default
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- How to sort WooCommerce products page by latest in-stock items first?
- WP_Query for woocommerce products with a pattern as a post_title
- What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL
- Failed to load resource: the server responded with a status of 500 (Internal Server Error) through wp_admin_ajax.php
- Get WooCommerce products with similar SKU
- 404 on old link after changing post url
- Ajax filter with loadmore button
- Showing search results on a page
- How do I properly upgrade WordPress’s PHP within an OpenLiteSpeed GCP instance? [closed]
- How do I disable cache for a certain page?
- how to fix Warning: A non-numeric value encountered in this specefic line of code
- Responsive loop with 3 columns inside row then 2 columns
- How To Get HTML Eelement From Another Page
- i got this error : Warning: call_user_func_array() expects exactly 2 parameters, 3 given in
- Fetch commens from a specific post
- Set notification if is two product category in cart
- Cron job -many duplicate posts
- Change headers for one custom PHP file
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Changable favicon
- Styling a specific post after hovering over it
- Insert div after every three posts in home.php [duplicate]
- How do you change the tag font size in the repeater-template.php [closed]
- PHP tag in post content makes wordpress go crazy
- Display Content Based on Custom Field Value
- Inline Styling a div from a Custom Metabox
- How can I turn a url with get method as a clean url with segment as the get method?
- insert thumbnail image from php script
- WordPress rating by views [closed]
- 403 (Forbidden) delete file image in themer folder
- Limit the number of successful logins
- How to call a certain object/menubar in a PHP file
- Custom field in title
- Dynamic Gallery
- Blog only showing code
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Get null from POST
- How to have post count after each listed category
- why is markup routinely placed in functions in wordpress?
- Jquery autosave text area after typing
- Remove default Image Sizes
- A better way to write this php function
- How can add alt tag in following code. Image are showing dynamic in wordpress