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
9 views

How can I add the header which is used on the main page? [closed]

I have created some pages using the elementor plugin which is having common header and footer. Now I am trying to add an external HTML page into the public_html folder and it's loading properly. I ...
  • 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
17 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
44 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' ...
  • 121
0 votes
0 answers
30 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
10 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
15 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/...
  • 193
0 votes
0 answers
32 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
38 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
65 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
100 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
30 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
14 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 ...
  • 145
1 vote
0 answers
193 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
49 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
110 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
0 answers
28 views

Defining path of content folder in WP-config solves the issue of missing header, footer, theme options. Is this a good approach? Expert Advice needed

The header, footer, theme options went missing on the website. I am using the latest Bitnami WordPress Stack on Amazon Lightsail, Approach A: Bitnami installations using system packages. When I ...
0 votes
0 answers
41 views

Moving Javascript from footer to header

Plugin class is using action-hook for wp_footer in it's init function to assing script to footer. In that callable it does do two things: Registers the script (with in_footer argument true) Enqueues ...
0 votes
0 answers
11 views

Featured image not shown in header

A company gave me this webpage to work with. I'm not sure what I did but the image background for the heading has dissappeared. (https://www.icelagoon.com). I've been mainly using Elementor to create ...
0 votes
1 answer
61 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
17 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
238 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
701 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
827 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
394 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 ...
0 votes
1 answer
316 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 ...
  • 3
0 votes
1 answer
410 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 ...
0 votes
1 answer
136 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('...
's user avatar
2 votes
0 answers
88 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 ...
  • 658
0 votes
0 answers
66 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
30 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
191 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,886
0 votes
3 answers
148 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
29 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
221 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
321 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
610 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 ...
  • 753
0 votes
1 answer
44 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
61 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
72 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
82 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 ...
0 votes
1 answer
28 views

Remove a link in the header

I don't know why but in the header I've always have the page name and that thing below '-> page name'. How can I get rid of it? Thank you so much.
0 votes
0 answers
22 views

How can I change the header on the pages?

I'm working with Manufacturer theme and I'm trying to have one header image for each page I have but I can't. Does anyone know how to do it? I've found that I can change the header here: but it will ...
1 vote
1 answer
233 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....
0 votes
0 answers
487 views

Remove server response header

I'm fairly new to WP/PHP and I'm trying to remove the server response header in functions.php. I've been trying use something like this but it doesn't work: add_filter('wp_headers', function($headers) ...
  • 3
0 votes
0 answers
101 views

How can I pass a variable from a template to header.php of a theme

As of version 5.5.0, WordPress introduced second argument (array $args) to get_header. I am calling get_header in my templates including index.php and I want to pass meta description value from ...

1
2 3 4 5
12