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
0 answers
8 views

How to remove a black bar in header? [closed]

My WP settings : Version de WordPress : 6.1.1 Theme : minimalistbloguer Extensions : Elementor ,Fullwidth Page Templates , IONOS Performance ,UpdraftPlus - Sauvegarde/Restauration , Visual Portfolio, ...
  • 1
0 votes
0 answers
25 views

Cache - How to force browser to reload wordpress assets from server instead of the cache [closed]

I have created a custom vue headless theme for my wp project. Since sometimes the data aren't loaded correctly, I want that the browser reload everytime the files instead of use the cache. I've added ...
  • 3
3 votes
1 answer
128 views

wp_redirect() doesn't work

I am inserting a piece of code to my website that includes a redirect statement. Everything works fine except the wp_redirect();. The following warning message appears. Cannot modify header ...
  • 129
0 votes
0 answers
12 views

Wordpress custom header parameter combine with cache

I want to add the post ID to headers parameters for wordpress. Regularlly, when no cache, it's working fine. But when cached is enabled. It's hidden. The idea basically put the header("ID: "...
0 votes
0 answers
35 views

Insert a custom field as a second email address to a completed order in WooCommerce

I'm looking to use a custom field from "Checkout Field Editor for WooCommerce" to use as a second email address to a completed order in WooCommerce. I started by using this code which works ...
  • 1
0 votes
1 answer
9 views

Error Message - Cannot login to Wordpress

I am getting this error message and cannot log in to wordpress anymore. Can someone please help: Warning: Cannot modify header information - headers already sent by (output started at /home/customer/...
  • 1
0 votes
1 answer
12 views

WooCommerce: I Need to hide my page title/header (including menu) from all the WooCommerce related product pages, such as category and keyword pages

I've been trying to hide my page header from showing different WooCommerce related product pages/search. I managed to put the right CSS to hide it from main product page, but when certain category or ...
0 votes
0 answers
8 views

Forcing header cache control in 404 pages

I'm trying to force the caching of 404, 410 and 301 pages. I've found some solutions but they have some issues. The 404 is trying to undestand preemptively if the page will be a 404, and it take a ...
  • 303
0 votes
0 answers
21 views

Dynamic Email Handler with 'header ("Location: ...'

hope you are well! Description I am coding a theme to reuse with clients. However, I am trying to avoid showing my clients' email on their websites and like to use a dynamic email-handler.php ...
  • 1
0 votes
0 answers
12 views

How to make a slider hearder?

My goal is to make the same kind of header as the bottom part of https://www.hotukdeals.com/' header where you have an arrow on both sides and between them, all the categories that the website has. I ...
  • 1
0 votes
0 answers
9 views

Changing The Default Header POST Title and Description text by category in wordpress

everyone. I use the Business3ree Ignition theme by CSS Igniter. I have set up two categories "Tips" and "News" to filter my content in those two categories. I need to be able to ...
1 vote
0 answers
18 views

Footer option is missing in Customiser

Below is my dashboard screenshot, I don't see the footer option in my customizer. I have struggled a lot to research on this but no luck. Can anybody please help me with this? how can I show the ...
0 votes
0 answers
141 views

WP Rest API - Change response status code for failed validation request

I have created a new route with this code: register_rest_route( 'namespace', 'some-route', [ 'methods' => WP_REST_Server::CREATABLE, 'callback' ...
  • 125
0 votes
0 answers
32 views

Why does website stretch and white space on load? [duplicate]

On loading my friends website is stretching and has a white space. Does anyone know what is causing the white space and stretch on load ? https://bit.ly/treesurgeons
0 votes
0 answers
12 views

Downloading File via headers doesnt work

public function handle_bulk_action( $redirect_url, $action, $post_ids ){ $redirect_url = remove_query_arg( 'export', $redirect_url ); if( $action == 'export' ){ $...
  • 1
0 votes
1 answer
170 views

Having Issue on Redirecting With Session in WordPress

I am trying to create a simple login system in WordPress using core PHP but I am getting this error message Warning: Cannot modify header information - headers already sent by (output started at /www/...
  • 201
0 votes
0 answers
85 views

How do you remove header sitewide from mobile only?

I'm having trouble hiding my header on mobile devices. My wordpress theme does not have an option to hide it, so I was looking at the theme's header.php file if there was anything I could add to it. ...
0 votes
1 answer
114 views

404/500 error on content images if Referer header is from another domain [closed]

Not very familiar with WordPress so I'm not sure what's causing this. Essentially, we have a few image assets stored under wp-content. When we access some assets (i.e. cmssubdomain.apex.com/wp-content/...
  • 113
0 votes
0 answers
167 views

WP_REST_Response - How to return Gzip answer and add Content-encoding header?

This code runs correctly : function get_travelbooks($request) { global $tsp_mdlObj; $result = $tsp_mdlObj->read_travelbooks(); return new WP_REST_Response($result, 200); } Now I ...
0 votes
0 answers
236 views

WordPress plugin with CORS

I have couple API routes that I want to use on another site by making ajax calls, however, I keep getting Cross-Origin Read Blocking (CORB) blocked cross-origin response. I have tried CORS PLUGINS ...
0 votes
0 answers
12 views

How to download CSV from sub directory in uploads folder

hello guys i donot have experience working with the csv. I have a very big form i wanted to make a custom csv export for this form and a new csv is generated every time the form is submited. i am ...
0 votes
1 answer
32 views

Does wordpress templates always in files or in database?

I have theme and in header.php and I found this templates (see attached screenshot). But there is no content directory in template directory. Even I searched for those files (header-private.php and ...
0 votes
0 answers
18 views

Multiple use wp_logout_url() on page cause 'header already sent' error after submit form

I am using two wp_logout_url() echoes on page. The first one is used in header.php custom theme file, second one is used in another page template file (page-[customslug].php). On that page i have a ...
  • 157
1 vote
0 answers
456 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 ...
0 votes
1 answer
62 views

Adding Plugin Assets to Header

I am creating a WordPress Plugin. I have already added some pages. But I want to add custom CSS to that pages in the <head>. I am trying: add_action( 'wp_head', 'DisHeaderAssets'); But nothing ...
0 votes
1 answer
193 views

How do I use an iFrame for my header in Wordpress twenty seventeen?

I'm pretty new to Wordpress, and I'm currently trying to make a site using the twenty-seventeen template. My ultimate goal is to use an iFrame of a sketch I made in p5 as my header media, so that when ...
0 votes
1 answer
122 views

Wordpress can't use ZipArchive

Im currently developing a site where customers can download brand images like packshots. Ive made a custom cart where the client should be able to download all images added to the cart using ...
0 votes
0 answers
28 views

How can I remove or change the tooltip of an icon

I've been using Education Base Pro theme and have been trying to change the tooltip of an social media icon because the options displayed do not have the one i needed (anchor), so what i did was ...
1 vote
1 answer
418 views

Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]

I would like to Create A Wordpress header with {the_custom_logo();} custom logo in between the menu splitting the menu into two equal parts so that the logo is always aligned to the center of the ...
0 votes
1 answer
901 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
0 answers
1k 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
1 answer
568 views

WordPress Favicon not Working For Images/Videos/PDFs

I am using WordPress with Neve theme, for my site, Favicon is working on posts/pages, but Favicons aren't visible for JPG/PNG/Videos. If I use the Theme Customizer and select the Favicon PNG image, it ...
1 vote
1 answer
532 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 ...
  • 13
0 votes
1 answer
660 views

Set cors header for ajax requests

I am trying to use wp-ajax inside another sub-domain, but I am getting a CORS error. To solve this I used add_action with the send_headers hook: function cors_header () { header('Access-Control-...
0 votes
1 answer
35 views

Not so common HTML transition to wordpress issue

This is one possibility most of the time: <div class="wrap"> <header></header> <main></main> <footer></footer> </div> But my ...
  • 1,817
0 votes
1 answer
201 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('...
user avatar
2 votes
0 answers
117 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 ...
  • 718
0 votes
0 answers
80 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
0 answers
18 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
0 answers
32 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
1 answer
307 views

Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection

So I'm putting a plugin together that will allow me to connect multiple client sites with an online service. I can get the service vendors snippet to load, but once you interact with it, that's where ...
  • 1,935
0 votes
3 answers
203 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
0 answers
31 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 ...
  • 314
0 votes
2 answers
477 views

Display values of current POST request on page

I would like to get some value that was included in the http request header and display it on my webpage, i.e: I have a webpage, say: 'mywebsite.com' I have a POST request to 'mywebsite.com' with a ...
0 votes
1 answer
501 views

Add meta tags to a custom header

I'm trying to create php code to change the Wordpress header. With the help of https://wordpress.stackexchange.com/a/134524, I have the following: add_filter( 'wp_headers', 'add_meta_to_header' ); ...
  • 117
0 votes
1 answer
796 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 ...
  • 763
0 votes
1 answer
62 views

Page header on specific page is different from the rest [closed]

I've been trying to solve this for ages now. I finally resorted to asking. I am using a theme and I have created a child theme. Everything is working fine, except the that one page uses a completely ...
  • 1
0 votes
0 answers
81 views

Logo showing on some page but not on product categories pages

I am using a bought theme, and i have added my logo in my navigation/header in appearence and it works fine on all pages. But not on product categories. It is like it is using some kind of standard ...
  • 1
0 votes
1 answer
106 views

where can i add custom script to stop header video from autoplay

How can I add the custom script from this answer to my site to stop the custom video header from autoplaying? $( document ).ready( function() { $( document ).on( 'wp-custom-header-video-loaded', ...
0 votes
0 answers
119 views

Cannot collapse a responsive menu in Wordpress

I am new to website development so I am testing with some responsive menu to see how it works in Wordpress. I have selected this menu and it works perfectly in the demo. Yet, when I apply the code to ...

1
2 3 4 5
12