Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [headers]

HTTP headers are what is sent to the browser before the page markup. They often include the page MIME type, charset, status code and encoding. Headers are often overridden to change the page MIME type or redirect the user.

0
votes
0answers
28 views

The letter “i” appears capitalised even when I don't mean to capitalise them

For some reason, the letter "i" always appears as a capital (I) even when I don't want them to. Does anyone know of a possible fix? See below for an example. The word here is "Shopping". The theme I'...
0
votes
1answer
17 views

Serve text/html from wp-json API via WPEngine, headers not being set properly

I have read multiple entries in the WP Codex, numerous articles and Stack Exchange questions. I have a fully functioning API for a private plugin I am developing, but when moving it into production on ...
0
votes
1answer
11 views

Set og:image programmatically in custom single post with external images

I have created a plugin with a custom post type and the single post template pulls in photos from an external site. I would like to programmatically set the source for one of these images as the og:...
0
votes
1answer
19 views

Premature end of script headers: wp-mail.php?

I haven't edited wp-mail.php at all. I'm using the default WordPress file. I'm trying the whole submit post by email function that we know in settings (using gmail and pop3, if that's relevant). I ...
0
votes
1answer
22 views

Change header image size

I have a header image which looks great on desktop, however, when accessing the site on a mobile device, the image gets cut off in the middle. How can I make it that the image automatically rescales ...
0
votes
0answers
17 views

How can I add a logo to the hamburger menu?

I have a mobile hamburger menu setup, but I am having trouble adding my logo to the left of it. This is coded to go against the theme. Any idea on how I can add a clickable logo to the left of the ...
0
votes
0answers
21 views

How do I get the featured image to sit below the header in the twenty nineteen theme?

In the twentynineteen theme, the featured image in a post becomes the background of the post. Actually, it becomes the background of the header. I'm trying to get it sit below the header in each post ...
0
votes
1answer
18 views

setcookie() issues on running with HTTPS on WordPress

I have set 2 custom cookies to be saved when user clicks a button that runs the script to save the cookies. The issue is that I need these to be saved through HTTPS because I am using them on a store ...
0
votes
0answers
14 views

Warning: Cannot modify header information - headers already sent when trying to download a simple text file [duplicate]

I want to be able to click my "Export" button and have a text file downloaded. When I try this, I get the error: "Warning: Cannot modify header information - headers already sent ....". I have a ...
1
vote
1answer
17 views

Header style different on home and remaining pages

Would it be fairly simple to add different site header and menu styles and assign them to specific pages? I have very basic understanding of how CSS and php work and managed to customise the theme but ...
0
votes
2answers
30 views

Issues with if, else, and elseif statements

For my site, I need to have different header colors depending on the page it's on. Here's the code I have for my site that is working: <?php if ( is_single() && is_post_type('product') || ...
0
votes
1answer
20 views

Allow user to choose header style

I am working on developing a simple WP theme that our office will use as a starting point for any future projects that come in. My question is this: How would I go about adding functionality that ...
1
vote
0answers
11 views

How to properly modify WP Vary or any existing headers?

I have a site that currently have a some part of the headers like: Vary: Accept-Encoding, Cookie I want to modify it to be: Vary: Accept-Language I tried the suggestions here using this code ...
0
votes
1answer
71 views

Cannot modify header information - headers already sent during plugin activation

I am getting this error PHP Warning: Cannot modify header information - headers already sent by (output started at /home/zk2ba8xn663w/public_html/wp-includes/formatting.php:5100) in /home/...
-1
votes
1answer
46 views

Cannot modify header information - headers already sent

So I have a form on one page, which is submitting to admin-post.php, then there is a function in functions.php which is processing the form. It stores the input field data to database and then after ...
0
votes
1answer
37 views

Two same AJAX calls - one is working, other doesn't

I am developing a WP plugin. I have two same AJAX calls, one is working, and second one is giving me 400 Bad Request error for admin-ajax.php. ReadyState is 4, responseText is: " ↵ ↵ ↵ ↵ ↵ ↵ ↵ ↵ ↵ ↵ ...
0
votes
0answers
38 views

Fix “In order to improve scrolling performance in Safari, we now move the element to a fixed positioning layer”

I implemented AMP on my WordPress site with the Automattic Plugin and set up a Sidebar using <amp-sidebar>and a headerbar using AMP Project documentation. Right now, when I try accessing the AMP ...
0
votes
1answer
28 views

Wordpress site screwed up after adding Facebook Pixel inbetween header tags

Added my facebook pixel code between the header tags on my header.php theme file and now my website is all screwed up and not displaying properly. I tried deleting the facebook pixel code and saving ...
0
votes
1answer
27 views

Wordpress cookie issue on login: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

recently I had the problem where on login page Wordpress reported an error: ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. This was asked ...
0
votes
3answers
52 views

Responsive header images

I just set up a WordPress site and have the same problem I have with all my other WordPress sites: The header image isn't responsive. It's 2,000 pixels wide regardless of how tiny the screen is. I ...
0
votes
1answer
25 views

How I can overlap my menu in my header picture

How I can overlap my menu in my header picture. I want the menu can be seen on the header picture. This is the example like I want. Thank you. Example :
1
vote
2answers
36 views

How to add a class to the <html> element?

I'm using the X-Theme in Wordpress and I ran into an issue where I needed a CSS class in the <html> tag, but only on one page. This is the code I added into my child theme header file: <!-- ...
0
votes
1answer
28 views

Debug in WP backend

The problem - I get these warnings each time I login to /admin page in WP. Depending on which browser I use, there are problems with these: Warning: call_user_func_array() expects parameter 1 to ...
0
votes
1answer
53 views

How to add close button to dropdown menu that also reverts to menu button on another click

I am creating a custom dropdown menu for my WordPress blog header. I did everything correctly but could not add close button that opens on first click and revert to default on another click. I mean ...
0
votes
2answers
46 views

Last-Modified header support doesn’t speed up server processing - want more

I’ve just added “Last-Modified” / “If-Modified-Since” header support for some pages on my site via the recommendation here, but I didn’t see a very noticeable client page load speed improvement. This ...
0
votes
1answer
47 views

“Cannot modify header information” means I can't use wp_redirect

I am working on a site where new users are expected to agree to read our site policy before they can proceed. Once a new user logs in, they are redirected to the policy page. To continue to the read ...
0
votes
3answers
25 views

How to deactivate the text, that appears, when you hovering over topbar tabs? [closed]

I want to deactivate the text, that appears, when you're hovering over topbar tabs (I've marked it red in the screenshot). Im using the Oshine theme. Greetz
0
votes
0answers
33 views

Duplicate Header and Footer

I am creating a new page template and also need to create a duplicate header and footer php template to use with the new page template. I have already duplicated each php file and named them header-2....
0
votes
0answers
16 views

Custom banner / header for certain posts or pages

Below is the code for my template-banner.php file. However depending on the post or page I want to display a custom banner. I have tried some plugins made for this however these do not work for my ...
0
votes
1answer
169 views

Enable CORS for getting an inline SVG by URL

TLDR; Is there a way I can enable CORS for SVGs in my WordPress back-end, so I can get them through a http request to a different domain? Ideally without having to touch .htaccess? What I'm aiming ...
-2
votes
3answers
58 views

CSS does not take effects and it doesn't show in inspect [closed]

Hi I am trying to do a simple thing for my header at https://blog.madesoma.com/, but I don't know what's wrong with it. .site-header { background-color: #473C93; } #branding-logo { float: left;...
0
votes
1answer
82 views

Change header.php of a specific Wordpress Multisite

I wish to change to change the header.php of child theme and add <meta name="theme-color" content="#ff6600" /> into it. However when using the editor under 'Network Admin', changes are ...
-2
votes
2answers
30 views

Editing Header with a Page Builder [closed]

Is it possible to edit my site's header with a page-builder plugin, such as Page Builder, Elementor, or Gutenberg? I don't want to be stuck in the constraints of the theme and/or Wordpress's idea of ...
0
votes
1answer
28 views

“Headers already sent” error triggered in “parse_query” action

I have this code registered to the "parse_query" action which attempts to trigger a 404 based on the availability of an API asset. My implementation is based on this answer to another question. ...
0
votes
1answer
29 views

Adding custom html/css/images to Theme

I have a small header-of-sorts that's in a html file, with its own css file and a folder of images (svgs). I'm basically trying to put this on my site in the header, so I made a child theme and went ...
1
vote
1answer
36 views

header menu structure: cannot add additional menu items without alignment issues

When I add a new menu item to the header menu there is an alignment issue (please see the image). I'm not exactly sure which part of the header.php file to modify to address this problem. Update - ...
1
vote
0answers
26 views

How to remove main domain header title from after sub domain header title

I have installed WordPress on the main dame in public HTML and have installed all domains in the sub folder. But when we do Google, the title of the main domain comes in the title of all the domains. ...
1
vote
0answers
15 views

I want to hide header in the static homepage that I am working on [closed]

I am creating a static homepage with SiteOrigin Page Builder, and I want to hide header (everything including logo), I want to add a bigger version of the logo in the static page. Link - http://...
1
vote
1answer
120 views

How to prevent page from resubmit on refresh when “Cannot modify header information - headers” warning shows

I know that there are many possible duplicates but i keep receiving this error each time I'm currently working on a WordPress contact form, which is created as plugin. I need after submitting the ...
0
votes
0answers
43 views

remove_action('genesis_header','genesis_do_header') hook not working

I am trying to remove the default 'genesis_do_header' action from the genesis_header hook in order to format my own header layout; however, for some reason it is not working when I try to either ...
0
votes
0answers
138 views

WordPress theme trying to use Background Image in Header

I'm currently using a theme called Allegiant Pro (https://cpothemes.com/theme/allegiant). Previously, the theme recommended using a plugin called WP Display Header to have custom header images for ...
0
votes
1answer
83 views

Warning: Cannot modify header information - headers already sent by

I want to add some "dependencies" (Bootstrap and CanvasJS) to my WordPress website. Therefore I wrote such code in functions.php file: function basic_enqueue_style() { /*Bootstrap*/ ...
0
votes
2answers
1k views

Adding javascript to child theme

I want to apply some javascript to my header and want to know what the best way to implement it is. here is the source that contains the javascript I'm including - https://codepen.io/kaemak/pen/mHyKa/...
0
votes
1answer
19 views

I want to remove part of a header

Here's my question: I want to remove the second part of the header (a certain bar) of this page: http://marbleconsulting.nl/?page_id=127 . I want to remove the part that says 'home > testimonials'. I ...
0
votes
1answer
74 views

Stop plugin from adding cache headers

I'm currently using a plugin called 'Userpro' for user registration and login. This plugin culprit is that it adds no-store, no-cache headers whenever activated. I contacted plugin authors for the ...
0
votes
1answer
78 views

Headers already sent / AJAX

i wrote a little plugin, who displays a custom form in frontend and store entered data in local DB with connection to MailChimp. With a shortcode. Now i´m getting an error "headers already sent..", ...
0
votes
0answers
13 views

Header Menu colors still changing to grey

I have got transparent grey header menu and I want to menu items be white. When I adjust settings, everything is OK, then I go to my main web page (home) and when I come back (blog) it changes to grey ...
0
votes
0answers
186 views

TwentySeventeen video header mobile button unresponsive

I tried to make the header video in the TwentySeventeen theme available for mobile. The video showed up after adding minHeight and minWidth to the custom-header.php file: function ...
0
votes
0answers
47 views

Show header.php & footer.php in admin dashboard

How can add the header and footer of my site into the admin dashboard so that the admin dashboard resembles the frontend of my site? The structure that I want would be {Header.php} {Admin Dashboard}...
0
votes
0answers
231 views

Change Header Color for specific category posts

there is two categories of blog posts on my website, how should i change color of header in single posts page for just one of categories?