Questions tagged [custom-header]
Custom Header is a WordPress theme feature introduced with Version 2.1. Custom header is an image that is chosen as the representative image in the theme top header section. To use this feature, it must be activated in the theme with `add_theme_support`.
134 questions
9
votes
1
answer
3k
views
How can i get the name parameter defined in get_header?
For example, on my blog pages i use get_header('blog');, but i don't want to create a new header template called header-blog.php, because i just want to make a small adjustments. Is it possible to ...
8
votes
2
answers
4k
views
How to get the custom header image's alt text?
I'm using a custom header in my theme. My aim is to add an alt attribute to my custom header img element. My img element so far looks like this:
<img src="<?php header_image(); ?>" height="&...
7
votes
1
answer
197
views
When cropping a header image, retain meta data (i.e. name, description, etc.) from original image?
I'm currently using WordPress's built in Custom Headers to get images for a slideshow on the homepage of my website. For the most part, this has worked as intended; it allows me to upload a set of ...
4
votes
1
answer
6k
views
Adding custom fields to the header.php
I want to add advanced custom fields/custom fields to my header.php as it contains text and phone numbers that we may change - I have tried referencing them but it didn't work. I have also Googled and ...
4
votes
0
answers
171
views
Additional Option on Custom Header admin
I would like to extend the Custom Header class to include an animation feature for the header graphics. Essentially, I'd like to add another possible value for the radio button for randomization. The ...
3
votes
1
answer
3k
views
How to edit <head> codes of an individual page/post?
I want to run a JavaScript and I want to paste in inside the <head></head> tag
I do not want to add it to the text-view area.
How can I add this code snippet to an individual post (I ...
3
votes
1
answer
2k
views
Custom text-only header
I am developing a WordPress theme and would like to make use of a custom header on a the homepage (I'm using a custom page template).
I would like this header to not include an image, but rather an &...
3
votes
1
answer
3k
views
How can I add a custom header to a custom template in a plugin without using the theme folders
There is a lot of documentation on how to create custom headers for a theme. For example, if I wanted to add a header named:
header-custom.php
I would add this to my template file:
get_header('...
3
votes
0
answers
388
views
Remove elementor header and display default theme header
I am using Elementor pro and I am using Tabor wordpress theme(Here theme link: https://themebeans.com/themes/tabor/). I create custom footer within elementor pro and I noticed that the default theme ...
2
votes
2
answers
6k
views
How to use a svg as custom header?
I want to use a svg as a custom header in WordPress.
I tried two ways:
First
I want the user to be able to upload their own svg as a custom header.
So I enabled svg uploads in the functions.php:
...
2
votes
2
answers
2k
views
Different custom header image on different page
I am now creating a website for my client, this client wants me to make each page of the section of header image able to be easily uploaded by them in wordpress admin panel.
This is the code I have ...
2
votes
2
answers
13k
views
How to change default header image dimensions in twentyfourteen child theme?
I'm creating a child theme based on twentyfourteen and wish to change the custom header image dimensions. The custom header page states:
Images should be at least 1260 pixels wide. Suggested width ...
2
votes
3
answers
3k
views
How to change the height of featured image in Twenty Eleven child theme
I am trying to change the height of my featured image to 350px in my child theme for Twenty Eleven.
Can anyone help??
Note: I am using Twenty Eleven and there is no functions.php file in my child ...
2
votes
2
answers
2k
views
Custom header images won't appear when set to random
I'm using a custom theme, developed from Boilerplate (some time ago). I noticed that the header images work fine when set statically, but fail to appear when set to random. I tried switching themes, ...
2
votes
2
answers
87
views
Loss of sharpness in jpg imported as header in twentyeleven
When importing a jpg into the header position (jpg created in indesign at 1000 px wide) for the twentyeleven theme, the photos are not sharp. what is causing this and how do I fix it?
2
votes
1
answer
1k
views
Mysterious HTTP 404 header in my own scripts
I have a WordPress 3.5.1 + nginx configuration. Its nginx configuration is this:
server {
root /mysite/public_html;
server_name wp.mysite;
location / {
try_files $uri $uri/ /index....
2
votes
1
answer
1k
views
Headers Content-Security-Policy CSP Major Issue
Im trying to add CSP :
Header add Content-Security-Policy "script-src 'self';" - to my htaccess,
seems like this line keeps breaking my site, The blocks gets broken, Unable to edit ...
1
vote
2
answers
286
views
What is the advantage of using header-catname.php over is_category('catname');?
Let's say I have a category named as catname (the slug would be catname). I want the header styled differently when visitors open the category catname.
The article on Ghacks explains how to create a ...
1
vote
1
answer
4k
views
Change location of header.php and footer.php
I wish to organize the my themes directory a little more.
Is it possible to move header.php and footer.php to a sub directory?
I guess it's done by hooking on to some action, but is it possible with ...
1
vote
1
answer
570
views
How to Edit the style of header title of Twenty Eleven Theme?
I would like to change the style of Twenty Eleven theme's site title and site description. I tried with style.css file but nothing happens when I refresh the website in a browser. Then I found the ...
1
vote
2
answers
6k
views
adding meta data using plugin to top of head
It seems if you use the wp_head hook as an action to put your custom metadata into the head tags of your page, it is dependent on where the theme you are using calls the wp_head. In my case, it is at ...
1
vote
1
answer
2k
views
Show Different Header on a Specific Post ID
I am needing to show a different header for a specific page.
I created a custom page template that calls/shows the normal header that the entire website uses.
I am using this page template for about ...
1
vote
3
answers
1k
views
How to Handle CSS for Multiple Header header.php Files?
So, I'm building a new theme based on Underscores. So far, I've managed to get ACF Pro to call different header files from a dropdwon selction in the Options page but, now I am faced with the task of ...
1
vote
2
answers
2k
views
How to add text to header below title but above nav
I need the text seen in light gray at the top of the header to be below the site title/tagline but above the tabbed navigation:
devtest.lcnlit.org
I would prefer learning to do it the proper way (...
1
vote
1
answer
812
views
Change the location of add_theme_support( 'custom-header' ) in the customizer
I'm using add_theme_support( 'custom-header' ) to upload images for an image slider. The slider also has other settings in the customizer (duration, fade, overlay color, etc).
Because there are ...
1
vote
1
answer
972
views
Different Header Files Wordpress
How do I call a different header files in WordPress.
For example, I made a wordpress theme with a variety of different display header.
There header1.php, header2.php, header3.php, header4.php, ...
1
vote
1
answer
1k
views
add_theme_support('custom-header') does not add the option to customize
I am using this to get custom header support to my new theme:
function my_add_header_support() {
$ch_defaults = array(
'default-text-color' => '',
...
1
vote
3
answers
2k
views
Remove an uploaded header image
I'm developing a theme which supports a header image, when you've uploaded a few header images you can select to show them randomly as header image. When you want to remove one header image you can do ...
1
vote
1
answer
370
views
Header Slideshow [duplicate]
Possible Duplicate:
Using short codes
I want to add a slideshow in the header section of twenty eleven theme instead of header image. I have tried different plugin , but the only work into the ...
1
vote
2
answers
3k
views
Modify wp-admin page header 'viewport' meta data
The 'wp-admin/admin-header.php' file outputs 'viewport' meta data. It seems the value of the viewport is hard coded into the file. (See: https://github.com/WordPress/WordPress/blob/master/wp-admin/...
1
vote
1
answer
2k
views
How to insert a Button or custom text on twentyseventeen header
Is it possible to add a button, svg and extra text paragraph to header image on the twentyseventeen theme? This is an example of what look I'm trying to achieve https://github.com/ppass5/...
1
vote
2
answers
219
views
Want to make header and footer CMS driven sothat Editors can modify its content from wordpress admin section
First time I am working on WordPress CMS but have fair experience in other CMS products such as Umbraco, Tridion , sitecore etc.
I am using ACF (advance custom field) to create the content forms in ...
1
vote
1
answer
5k
views
Changing custom logo link
I am trying to change my custom logo url on wordpress to go to a different website. I have tried many different ways to do this with php and child themes but every time I try something it just breaks ...
1
vote
1
answer
1k
views
Hide header texts (Title & Tagline) in custom-header.php
I am currently trying to enhance my theme development skills and still have a lot to learn in php.
I'm investigating the code of Underscores and Twenty Seventeen themes.
I simply do not understand ...
1
vote
1
answer
1k
views
From where the header-text can be changed in WordPress custom header?
I am developing a small theme as I am beginner. I am setting up custom-header using add_theme_support() function. From there I can change the header image in the front end. Ok, so far is good. Now In ...
1
vote
1
answer
85
views
Why I am getting Parse error: syntax error when I use 'wp_is_mobile'?
I am getting following error message :
Parse error: syntax error, unexpected '{' in /home/otcpaneluser/public_html/mytheme/header.php on line 1
My header.php have very simple lines of code. Those ...
1
vote
1
answer
670
views
Create mobile navigation header with settings integration
I'm a seasoned programmer but a completely inexperienced WordPress developer. I'm trying to figure out how to create a header that only shows for mobile devices, and how to modify properties of that ...
1
vote
2
answers
1k
views
Using website header, menu and footer on Wordpress blog
I want to use the header, top menu and footer from my website on my Wordpress blog. The website itself is not a Wordpress site but the blog is and resides in a 'blog' folder on my server.
So I guess ...
1
vote
0
answers
22
views
Determine what pages are in my header [closed]
I'm using the Howe's family of themes for my WordPress site. Two pages ("about" and "sample" at least one of which came with the installation) appear in my header. I'd like to add more, but I wouldn't ...
1
vote
2
answers
839
views
How to output php between header and woocommerce container
I am customizing my product detail page.
I put the code before the single product summary in content-single-product.php
As you can see here: Link to product page
But i want it like this:
Can some ...
1
vote
1
answer
288
views
Is there a way of registering a default logo image for custom-logo?
Similair to custom-header with register_default_headers() in version 4.5 and above.
1
vote
0
answers
151
views
Want to create Custom Header based on Geo Location
I am having 2 header UK & US Header. I want to redirect the US header & footer based on US location.
I am using Geo Redirection Plugin, but by using this plugin i can modifiy the URL ...
1
vote
1
answer
142
views
My menu bar dissapeared with autooptimize [closed]
After setting up auto optimize my menu bar is gone. You can still click the buttons where they would be but it is invisible.
Please help. This is a production website I can't have it like this for ...
1
vote
1
answer
26
views
Which header is served
I am using theme (Knowledgedesk) that includes a header.php in its child theme's directory. However the changes I make by editing header.php are not visibles.
It cannot be the cache, I already checked ...
1
vote
0
answers
72
views
Different banner for different section
I have different section like about us, portfolio, gallery. Client want to upload different banner for different section that I have given on every page custom field. But problem is I want same ...
1
vote
1
answer
201
views
How to change header image size in custom themes
I'm using WP 3.5 for a CMS for one of our clients. I need to have a bigger header image than 940 × 250 pixels, so I changed width and height parameters, but when I try to upload a new image, it still ...
1
vote
0
answers
644
views
Skeleton Child Theme Add Icon Bar to Header Flex Grid
Skeleton Child Theme Version 1.6
WordPress Version 3.4.2
Child Theme installed on main Multisite: public_html, wp-content, themes.
My CSS, PHP Coding skills = NOVICE
What I've done: Using the ...
1
vote
1
answer
2k
views
Header and nav menu problem on Thesis site [closed]
Unfortunately I managed to make the header image disappear and the horizontal nav menu distort on this Thesis themed Wordpress site I'm helping a friend with
www.euanmitchell.com.au
I've pasted the ...
1
vote
2
answers
742
views
Additional custom header image
Has anyone seen a way to add a new header_image to a theme? I need to add two configurable images in a theme. It doesn't really matter if it gets added as a new "Header" admin theme menu or if it's ...
0
votes
2
answers
2k
views
Best practice to update the file header.php
I would like to know, what is the best practice for updating the header.php file:
From within WordPress editor: Appearance > Editor
or Directly in the header.php file itself (in the www_root)?