A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
8 views

Menu not working on Mobile using Neve Theme

My website's menu works fine on desktop, but the hamburger menu doesn't work on mobile and tablet. When I click on it, nothing happens. I am using Neve theme. I have already disabled all plugins, but ...
0
votes
1answer
19 views

Should I use do_action in the header file?

I have a lot to add on the header file because of if/else condition. And it makes the file very messy. So, I have decided to include another file... So how to add it: Creating a function file and ...
0
votes
0answers
12 views

How do I allow CORS from my mobile application to my WordPress backend?

I am using WordPress Contact Form 7 plugin to send message from my mobile application. Of course testing with PostMan worked with no issues but as soon as I tried to post to the endpoint from my ...
0
votes
2answers
19 views

How do I add GoogleAnalytics header snippet in WordPress?

I am not sure where exactly I navigate to add the analytics code once so it gets to all the WordPress pages. Do I change the HTML manually or can I do this from WordPress somewhere?
0
votes
2answers
23 views

Unable to add logo or header [closed]

I want to add a logo on my WordPress website by customizing the theme "Bard", but every time I select an image from my library, it leads to a blank page. The same happens with the header image. And ...
1
vote
1answer
25 views

why enqueued styles in header.php shows in footer?

I`m using this code in functions.php: add_action('wp_head', 'addMyStyle'); function addMyStyle() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', false, '1.0',...
0
votes
0answers
29 views

Update Code to be Compatible with WP 5.3 ('cannot modify header information' warning)

The following function that we have in a plugin a developer helped us create (he is no longer available) is giving errors when debugging is on once we updated the site from WP 4.9 to WP 5.3. Wondering ...
0
votes
1answer
27 views

Can't change headers / From for wp_mail()

i tried nearly anything to change the From / Reply-to name for the wp_mail() function. Here is my code: $headers = "From: \"FROM NAME\" <from-mail@from.com>\n"; $headers .= "Return-Path: <...
1
vote
1answer
17 views

Resizing of a header/div in a website through css in wordpress [closed]

How can I resize the mentioned header/div of my WordPress website? I have already tried it through checking the div name by going into Inspect Element but it is not working. One thing more the size ...
1
vote
2answers
65 views

Cannot modify header information - headers already sent by pluggable.php

I'm trying to develop a simple plugin but I'm having a problem: I have a custom WP_List_Table in an admin page, but when I click on a button like "Edit Row" or "Delete Row" it performs some expected ...
0
votes
0answers
59 views

Using Javascript On Page - Header and Footer Now Missing

We have a custom product filter to display vehicles on a /products page. The filter uses Javascript and the JS code is place directly on the /products page content editor. The JS code is also placed ...
0
votes
1answer
18 views

set cookies on certain page only

I am trying to set a cookie on Wordpress on a certain page only. I've tried a LOT of different ideas but still can't get it to work as 'init' is called before the page is set. This is my current code:...
0
votes
0answers
18 views

Twenty seventeen header is not responsive

Hello the header of my Twenty Seventeen website is not responsive: when I open the site on my mobile phone (vertical view) the image is cropped. When in horizontal view everything is ok. All other ...
0
votes
0answers
20 views

Avada: Hide half of header v5 on different pages?

I am currently working on a website using Avada Header version 5, which consists of the fusion-contact-info header (Text + Nagivation) and a separate menu with 435px padding to allow for an image to ...
0
votes
2answers
53 views

How to change the width of certain paragraph or header blocks?

Most of the time I like having the blocks the full width of my site (https://princetonfireandsafety.com/), but sometimes I just want to have a single header or paragraph block that isn't that big. ...
0
votes
0answers
15 views

Drop down Nav Menu

I have tried to implement bootstrap drop-dawn nav menu, as Walker_Nav_menu, but no luck, start_lvl working just fine, but cannot add items to <div class="dropdown-menu"> element. Here is a ...
0
votes
0answers
9 views

Tweenty Seventeen Header as whole page?

I am looking to make my header the whole page, I don't want a home page there, I would just like the image or just the video. not sure how to do it?
1
vote
1answer
225 views

How to remove X-Frame-Options: SAMEORIGIN" from WordPress?

I want to temporarily remove X-Frame-Options: SAMEORIGIN and need to allow all domains. I have already tried the following ways. Removing send_frame_options_header from ./wp-includes/default-filters....
0
votes
0answers
13 views

How to render main header navigation bar across all WordPress pages

I am building a theme using the Highend plugin in WordPress. In Highend Options > Logo Settings in WP dashboard, I overrode the default logo to implement a custom logo. This new logo appears to render ...
0
votes
0answers
11 views

Header color issues

I have a transparent header with white text on my homepage which is set site wide. The problem is that my product and category pages are white background so they header gets lost on those pages. Can I ...
0
votes
0answers
24 views

Content-Security-Policy Header with JetPack

I am currently setting up a web server for WordPress. Ubuntu 18 with Apache2 behind Cloudflare. The WebSite is connected to WordPress JetPack. Everything is up and running, but I am stuck at ...
0
votes
1answer
12 views

3 WP installations on the same domain, with the same header

I'd like to have 3 Wordpress installations on the same domain, using the same header though. How can I achieve this? mydomain.com (WP content website) mydomain.com/shop (Woocommerce website) mydomain....
0
votes
0answers
149 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 '...
0
votes
0answers
9 views

Top header to edit page not present in one page

On one of our wordpress pages (we use polylang and it is only present on one language only), the top bar that appears when logged in as an admin to edit the page, customize the theme, access the ...
0
votes
1answer
44 views

Hook to change HTTP response headers

I want to write a simple Wordpress plugin. The plugin will: Read (if set) a cookie from the visitor Send a cookie (if not set) to the visitor Depending on the cookie value I will redirect the user ...
1
vote
1answer
105 views

Why does the header set X-Robots-Tag apply to all pages?

The directives below are intended to apply the header X-Robots-Tag noindex and nofollow to a single page. The directives below are applied before the WordPress code block however it appears to ...
0
votes
0answers
13 views

Header Navmenu glitching in Chrome (but not other browsers)

My website, https://bthsensor.com has been experiecning a certain glitch on the chrome browser specifically. The header navigation menu jumps from its assigned position when the cursor hovers over it. ...
3
votes
0answers
527 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 ...
1
vote
0answers
16 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 :)
0
votes
0answers
11 views

Appearing tab is not showing even after accessing WP_site through wp_admin

My wordpress website is not showing the appearance tab on it .I have logged in through WP-Admin.The site is functioning properly but the divi theme and plugins options and appearance tab is not ...
0
votes
0answers
17 views

Header with both normal menu and sidebar navigation menu

I'd like to have something like the tinder homepage, with a few text menu icons, followed by a hamburger widget, that opens a sidebar menu. Currently I have tried using oceanwp, and astra themes, and ...
1
vote
0answers
26 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 ...
0
votes
0answers
24 views

Where is the location header?

When I curl a page of mine, I notice that it is moved permanently to... itself: PS C:\Users\Ooker> curl -I xn--qucu-hr5aza.com/page/2 HTTP/1.1 301 Moved Permanently Server: nginx Date: Wed, 21 Aug ...
0
votes
0answers
48 views

How critical are Underscore.min.js, wp-auth-check.min.js, heartbeat.min.js and jquery.js if blocked by CSP?

The following files are blocked from loading when the following CSP is implemented. Header set Content-Security-Policy default-src 'self' 'unsafe-inline' https://fonts.googleapis.com; script-src '...
0
votes
2answers
37 views

Modifying child theme's header

I'm a noob. I have copied the header.php from the parent theme, I have added some snippets and things work. However, I would like to be able to add those same snippets either using a plugin or via ...
0
votes
2answers
37 views

Add my footer menu to the header

I want to add more links in my menu. duvacon.de ---> you see only the "categories", I want also add the links of my footer menu to the header. This code is for the header menu, now I want to add a ...
0
votes
1answer
164 views

How to disable primary main site header and logo in wordpress (Astra Theme) [closed]

I have installed astra theme on my wordpress. How can i disable primary header ? I used following code in child theme but still didn't work. add_action( 'wp', 'astra_remove_header' ); function ...
0
votes
1answer
284 views

allowed_http_origins() only works in theme functions.php

The following code works in my theme's functions.php file but not in my plugin's main/entry file: /** Allow cross origin resource access */ function add_cors_http_header(){ header("Access-Control-...
0
votes
0answers
12 views

Issue with Transparent Navbar on First Load

This is a test website I am i the middle of created – http://newsite.camerabeanbags.co.uk The issue I am having is that the Top Navigation Menu/header should be transparent when the page is at the ...
0
votes
0answers
74 views

Modifying server's response to API endpoint

I have a Javascript application in the front-end, with Wordpress in the back. The index.php of Wordpress serves the application if user is logged in, else redirects to login page. My application ...
0
votes
0answers
35 views

Remove top bar header

I'm having trouble removing some content from a website which I have taken over. There is a bar above the header which isn't a navigation bar and I am having trouble removing it. I was able to ...
0
votes
2answers
181 views

Is this a correct usage of ob_start() in my WordPress project?

I have extended WooCommerce to create a custom endpoint. This endpoint, points to a template that has a form to save user meta data. When the form is submitted I want it to redirect to another URL. ...
0
votes
1answer
21 views

Using different header images for different devices

I'm using the Ascension theme (by Go Daddy). When my website is loaded using a PC or ipad my header looks ok, however when loading it on a phone it is not resizing to fit the screen (so I'm losing a ...
0
votes
1answer
685 views

How do you completely remove the default header and footer using functions.php?

I cannot believe that this question has not already been answered, but the search does not come up with anything. If it has already been answered, please point me in the right direction! There are ...
0
votes
0answers
31 views

Change headers for one custom PHP file

I have a server.php file that I wish to host on the same server as my Wordpress site, that is required to send a POST message with a header of Content-type: application/json. Wordpress is preventing ...
0
votes
0answers
55 views

Customize wp_login_form appearance

I embedded a login form in my websites header for not logged in users. I added it using this code in my navigation-top.php: <?php if ( is_user_logged_in() ) { ?> <?php } else { ?> ...
0
votes
1answer
34 views

echo get_option in header template

I was trying to get this to work yesterday but my WP website is giving me trouble. This is my first attempt at creating plugin so please excuse me. I want to show an ad banner in header based on ...
0
votes
1answer
146 views

How to make JQuery load on top of head tag before everything

my website and plugins insert some jquery code between HTML tag and also whatever I do to insert jquery as a first script in the head section I can't get it to work I tried function ...
-1
votes
1answer
127 views

How to remove lines over text using Phlox theme with Elementor Pro?

I have been struggling a lot trying to get rid of a line that appears over the text of my home page. I am using the Phlox theme updated and elementor Pro for full compatibility. I already went into ...
1
vote
1answer
270 views

WordPress Redirect Not Working - AJAX Callback Response Not Picked Up

I cannot get a redirect working in my custom wordpress plugin. I have a button on a page which triggers an AJAX action which calls a function. In my function (which is definitely being called as I ...