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.

173 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
165 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
0answers
2k views

x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response

I would like my dev server on http://localhost:8080 to work with my wordpress install's rest api, of which the api base url is at http://localhost/wptest2/index.php/wp-json/ I am currently getting the ...
3
votes
0answers
42 views

HTTP Header on specific page is application instead of text

Problem: clicking on (WP site that I developed) webejeeping.com/vehicles/ causes the generated php file to be downloaded instead of being rendered in the browser. MIME Type returns as "application/...
2
votes
0answers
69 views

Header Button Chance Polylang Elementor

Currently, I am making a Bilingual website, and I made a button on the header as well, and I want to make the button bilingual as well, but I don't know how could I change its language because it is ...
2
votes
0answers
120 views

send_headers don't work on wordpress multisite

I have written a simple plugin to send some security http headers. I've tested it on various wordpress installations but on a wordpress multisite network it seems that the headers are not sended. The ...
2
votes
0answers
1k views

Change logo based on incoming domain

The agency I work for are trying to get a client's logo to change based upon the incoming URL. Now, we have 4 different URLs, therefore 4 different logos. Currently, we are using an if/else ...
2
votes
1answer
405 views

Custom Post Type Events Archive Grouped By Month

I'm currently trying to get my events listing code to print out headers by Month. So basically this: October event event September event event etc... Right now it just keeps echoing January. I ...
1
vote
0answers
30 views

How to debug error message: Cannot modify header information

I'm experiencing some wierdness with a custom theme in WooCommerce. I know that WooCommerce is off-topic, but while debugging it, I've figured out that it most likely is another plugin, that is the ...
1
vote
1answer
29 views

Remove transparancy in Sydney theme's headerimage

I'm bulimg a Wordpress site on the Sydney theme. On some pages the header image is kind of transparent. Not on the start page, but on all the other sites (example here: https://www.ferienhof-rauchhaus....
1
vote
0answers
377 views

Wordpress Twenty Seventeen header image size not responsive for mobile

I'm currently working on a website in wordpress. I've been struggling with this problem for a while. At the first the header image was too big even for computer. I managed to make it shorter using ...
1
vote
0answers
331 views

Google Tag Manger - no-script Code Not Found

I am having trouble getting the "GTM no-script code not found: either missing or not in " issue resolved. The GTM script is placed after the < head > tag. No issues. However, when using the ...
1
vote
0answers
2k views

"No Access-Control-Allow-Origin header is present" even though it is in the entry file

I'm seeing this in the Chrome browser console after doing a test fetch request: Access to fetch at 'http://localhost/wptest2/wp-json/pluginFolder/1.0/load?limit=10&offset=0' from origin '...
1
vote
0answers
31 views

How can i resolve 301 redirection Issue on my website?

When I scan my website on (https://www.woorank.com/en/www/fusionfirst.com) I already use canonical tag on my header section. Please check and help me :)
1
vote
0answers
50 views

How can I use cached images in an AJAX response?

WP_AJAX includes no-cache headers with its responses. I'm using Ajax to fetch part of a shopping cart, which includes little image thumbnails. On each Ajax request, these are replaced and we can see ...
1
vote
2answers
1k 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
0answers
61 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 ...
1
vote
1answer
202 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
1answer
54 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
41 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
413 views

Remove all Wordpress HTTP headers (not in-source embeds)

When we do CURL on our domain, there are things added to the header: server: nginx date: Sun, 27 May 2018 01:05:34 GMT content-type: text/html; charset=UTF-8 vary: Accept-Encoding link: <https://...
1
vote
0answers
218 views

WordPress 502 | Header Upstream send too big

In the past one of our clients ran in to the problem of having a certain page(while being logged in) return a 502 error (upstream sent too big header while reading response header from upstream) after ...
1
vote
1answer
2k views

Menu custom link not working for external site

I've got this header menu in my site (made editing a theme), but i've noticed that the custom links pointing at local anchor section (like #section) correctly navigate in the same page to the desired ...
1
vote
2answers
1k views

How to duplicate a page template but make minor changes to the header?

I will apologize in advance, I am very new to this. I have been teaching myself php as a hobby, but now I need it for work! I don't work as a web designer, but to try and save some money, I need to ...
1
vote
0answers
1k views

Creating dynamic header and footer files

I have an external search engine and I need to create a page to add it to my site. The page will sit on an external server, on an external URL. They are copying in the HTML header and footer but ...
1
vote
0answers
58 views

Strange 403 header response

I am receiving a strange 403 header response on the blog part of one of my sites. The site is accessible in the browser and works perfectly but googlebot, Moz and other checkers return a redirect from ...
1
vote
0answers
113 views

Wordpress 4.1 header image problem

I want to use a moving .gif as my header image in wordpress 4.1. In previous versions I could skip the cropping step and leave the image as is, and it would let me pick a moving gif as my header image....
1
vote
0answers
1k views

"imagejpeg" function is not working in wordpress

$image = imagecreatefromjpeg('http://localhost/test/wp-content/uploads/2014/09/city_81.jpg'); // choose a color for the ellipse $ellipseColor = imagecolorallocate($image, 0, 0, 255); // draw the ...
1
vote
0answers
3k views

wp-comments-post.php file returns a blank page

When i post a reply to my blog, it's return a blank page to me. It seems that happens because of this code in wp-comments-post.php if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { header('Allow: ...
1
vote
0answers
463 views

404 or ugly page on IE, but Firefox, Chrome looks perfect

I have a variation of this issue. Was happening before and after new theme. I was getting 404 in IE, now sometimes get partial page that looks horrible. Contents can vary when I refresh. I have no ...
1
vote
0answers
1k views

How to give a download link to a .csv file from the custom plugin?

I have made a custom plugin, which exports MYSQL table contents into a .csv file which gets saved in to wp uploads directory. Now, I am trying to give a download link for downloading directly a .csv ...
1
vote
1answer
123 views

pull non-wp site into content area of wordpress -or- pull wp header into non wp site?

I am building a site which has a ecommerce nature that is not able to be tied directly into wordpress. What my goal is to have a constant header that is generated by my wordpress header on all pages ...
1
vote
1answer
124 views

How to change header dimensions in Wordpress?

How can I alter the requirements for the header dimensions so that I can take an uncropped image and fill the top section (centring the whole image) instead of having white space at the top? I would ...
1
vote
2answers
3k views

How to remove header image in Twenty Eleven theme?

Please give me details on how to remove the custom header image in the Twenty Eleven theme.
0
votes
0answers
56 views

Prevent Wordpress from sending set-cookie http header

For some reason Wordpress is setting "Set-Cookie" in the header of the entire site, this is telling my cache server not to cache the page, I tried to remove it via .htaccess, but it disabled ...
0
votes
0answers
96 views

Reliable way to add nonce to HTTP Header in WordPress?

I am trying to implement CSP on my wordpress site. Inspired by this question, https://stackoverflow.com/questions/50002041/adding-nonce-to-script-tag I tried to build a way to add nonces to my ...
0
votes
0answers
10 views

Add 2nd logo on the opposite side of main logo in Lawyer lite theme

May I kindly request your assistance since I am actually stuck. I am using Lawyer lite WordPress theme for my site. I actually want to add a second logo on the opposite of the far left logo, which ...
0
votes
0answers
14 views

How do I redirect the browser to 404 page, if no posts are found in home page

I am listing posts on the homepage with pagination and if no posts are found on the home page. I want to redirect the page to 404 page and get 404 response code. For example, example.com/page/200 Page ...
0
votes
1answer
22 views

How to remove get_header From all single pages in wordpress with functions.php without plugin?

I want to remove get_header and get_footer conditionally and temporary from all single pages with functions.php i tried this remove action with conditions code but not works.. remove_action('...
0
votes
0answers
17 views

Change logo based on WP user role login

I have figured a way how to change the logo using the custom logo hook. However, when I switched to the theme my clients want to use, the theme doesn't use the custom logo hook. I don't have much ...
0
votes
0answers
16 views

Logo above menu

Good afternoon, everyone! I'm busy with my friend's website and have already used a lot of CSS, only I get stuck on the following. I would like to put the logo above the menu. So not the logo in the ...
0
votes
0answers
20 views

Responsive header image

I am new here. I have been looking into solving a problem I have been having for a while. I have setup my header image to be different for mobile and desktop. So far so good. However for screens with ...
0
votes
0answers
14 views

Design Header meta on single posts wordpress

I want design my header_meta on single posts like this, please help me Thank you,
0
votes
0answers
25 views

We are facing this error in header unable to understand the issue

call_user_func_array() expects parameter 1 to be a valid callback, function 'add_search_form' not found or invalid function name in /home2/zeonu81d/public_html/wp-includes/class-wp-hook.php Please ...
0
votes
0answers
16 views

Header dropdown not working on my custom built page

Hello my header drop down is working perfectly fine if i use it on the pages that i built with wordpress but the ones that i built from root in html php and css and imported the header dropdown is not ...
0
votes
0answers
123 views

Cors headers Ajax

I'm just trying to run a basic jQuery ajax get request on instagram's api. $.ajax({ url:"https://www.instagram.com/page?__a=1", success:function(data){ console.log(data) ...
0
votes
3answers
40 views

How to insert custom text after H1 to all my blog posts?

I'm looking for a way to insert "THIS ARTICLE MAY CONTAIN COMPENSATED LINKS. PLEASE READ DISCLAIMER FOR MORE INFO." after the H1 in all my blog posts (not pages). Is there a way to do it ...
0
votes
0answers
20 views

Including PHP files in header.php

I have multiple header files, which are 90% the same code. It would make editing them easier if common code could be contained and called from a separate file. However, neither "include" nor ...
0
votes
1answer
142 views

How do I modify the <title> tag on my Category Archive page?

I'm using the 2016 template and it uses wp_head() to render the title tag. So for Category pages it displays Articles about: whatever How do I modify this? EDIT: I ended up doing this hack. Which I ...
0
votes
0answers
21 views

Wrong to use echo in wp_footer

I have a feeling that my code is causing the following error: PHP Warning: Cannot modify header information - headers already sent by (output started at /public_html/MY-WEBSITE/wp-content/plugins/...
0
votes
0answers
20 views

How do I stop the Cumulative Layout Shift of a full width canvas animation item in the header.php file? (Google Lighthouse audit)

How do I stop the of Cumulative Layout Shift of this full width canvas animation item in the header.php file? Where is the vertical shift coming from in the code below? <canvas id="myCanvas&...