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
2 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 ...
user avatar
1 vote
0 answers
15 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 ...
user avatar
0 votes
0 answers
38 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' ...
user avatar
  • 121
0 votes
0 answers
27 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
user avatar
0 votes
0 answers
9 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' ){ $...
user avatar
  • 1
0 votes
1 answer
14 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/...
user avatar
  • 193
0 votes
0 answers
20 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. ...
user avatar
0 votes
1 answer
28 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/...
user avatar
  • 113
0 votes
0 answers
41 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 ...
user avatar
0 votes
0 answers
60 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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 145
1 vote
0 answers
151 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 ...
user avatar
0 votes
1 answer
42 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 ...
user avatar
0 votes
1 answer
95 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 ...
user avatar
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 ...
user avatar
0 votes
0 answers
34 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 ...
user avatar
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 ...
user avatar
0 votes
1 answer
52 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 ...
user avatar
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 ...
user avatar
1 vote
1 answer
200 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 ...
user avatar
0 votes
0 answers
632 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 ...
user avatar
0 votes
0 answers
765 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 ...
user avatar
0 votes
1 answer
350 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 ...
user avatar
0 votes
1 answer
258 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 ...
user avatar
  • 3
0 votes
1 answer
353 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-...
user avatar
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 ...
user avatar
0 votes
1 answer
117 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
1 vote
0 answers
79 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 ...
user avatar
  • 638
0 votes
0 answers
58 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 ...
user avatar
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,
user avatar
0 votes
0 answers
29 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 ...
user avatar
0 votes
1 answer
173 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 ...
user avatar
  • 1,866
0 votes
3 answers
137 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 ...
user avatar
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 ...
user avatar
  • 314
0 votes
2 answers
150 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 ...
user avatar
0 votes
1 answer
294 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' ); ...
user avatar
  • 117
0 votes
1 answer
572 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 ...
user avatar
  • 753
0 votes
1 answer
37 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 ...
user avatar
  • 1
0 votes
0 answers
54 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 ...
user avatar
  • 1
0 votes
1 answer
68 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', ...
user avatar
0 votes
0 answers
78 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 ...
user avatar
0 votes
1 answer
25 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.
user avatar
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 ...
user avatar
1 vote
1 answer
201 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....
user avatar
0 votes
0 answers
449 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) ...
user avatar
  • 3
0 votes
0 answers
79 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 ...
user avatar
0 votes
0 answers
22 views

Is it all right to put the whole <head> tag into template_part file?

I need to have more than one headers so this looks as a good idea but I'm not sure if it is valid. If so, what am I supposed to name a file? I named it head.php so far. Example: <html> <!-- ...
user avatar
0 votes
1 answer
2k views

Using a nonce Content Security Policy header for style-src for inline style elements returns errors

When using a nonce in a Content Security Policy header, both Google Chrome and Firefox return errors. The nonce value is for a style element i.e. <style id="some-id">// CSS </style&...
user avatar
  • 11

1
2 3 4 5
12