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.

learn more… | top users | synonyms (1)

0
votes
1answer
21 views

Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files

Just see the following code snippet. I have came across this in one of the plugins that I am reading now. if ( ! defined( 'ABSPATH' ) ) { header( 'Status: 403 Forbidden' ); header( 'HTTP/1.1 403 ...
-3
votes
0answers
6 views

Secondary Menu (storefront theme) not working after removing Search Bar

I wanted to delete, hide or something my search bar I found this question and the solution achieved taking out the search bar. add_action ('init', 'jk_remove_storefront_header_search'); function ...
0
votes
0answers
14 views

CORS header 'Access-Control-Allow-Origin' does not match “http://www.old-domain.com”

I am having problem on my website with SVG images. The website has been moved to public and i keep getting this error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the ...
0
votes
0answers
20 views

Disable or Modify Access-Control-Allow-Origin from Response Headers

I would like to know is that possible to modify or remove Access-Control-Allow-Origin from Response Headers Due to security reason, I need to change Access-Control-Allow-Origin from * to domain I ...
0
votes
1answer
14 views

Changing header banner dimension in child theme

I'm using Twenty Thirteen Child theme for my website running WP 4.5.3. I would like to change the header banner dimension to 900x480. The content of my twentythirteen-child/functions.php: <?php ...
1
vote
0answers
27 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 ...
0
votes
1answer
21 views

menu-item class missing on wordpress menu

I have this code in my header.php and its working properly except showing li's without menu-item class, its showing them with page-item instead. this is when i dont have a menu created from admin and ...
2
votes
0answers
18 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/...
1
vote
2answers
42 views

Add custom HTML to posts page

I want to add a header image via some custom HTML to the posts page but can't edit it with the pages menu in Wordpress. Is there a way to add the HTML in the specific PHP-File and which PHP do I have ...
0
votes
1answer
34 views

Wordpress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]

I downloaded a wordpress theme recently and i tried to run it but it gives me an fatal error shows that call to undefined fatal error(). Why this error generates ? I am a new bie to wordpress theme ...
0
votes
2answers
60 views

Using ob_start() in plugin

I'm learning how to build a WordPress plugin. In the sample plugin code, I have this PHP/HTML: ob_start(); // other plugin code <?php function plugin_rvce_options_page() { ?> <div> ...
0
votes
2answers
29 views

Javascript not working on index.php but it is working on single post's page

I am trying to use mathJax in my wordpress. According to the documentation at mathjax, the mathjax script url needs to mentioned in headers.php. Which is exactly what I did. And right now this is what ...
1
vote
1answer
75 views

How to load a different header based on post format?

I have a difficult question. What's the best way to load a different header based on a post format? I guess I could load another loop around the header but I noticed the site does slow down. This is ...
0
votes
1answer
54 views

Wordpress Install - “end of script output before headers” when running simple php script

I have a multi-site Wordpress installation for a client, and for one of the forms I need to do some manual database interaction as the feature is separate. The problem I'm having however, is that any ...
0
votes
1answer
11 views

Problem with adding custom post type meta to header by plugin

I'm trying to write a plugin by which a meta code will be added to specific post type header. I tried to use this code: function msc_header() { if ( is_singular( 'article' ) ) { echo '<...
0
votes
4answers
40 views

Wordpress Template not getting my Sub-Header File

My template works fine, however, its using my main header file, even though I have changed it to point to sub-header.php <?php /* Template Name: Sub Page */ get_header('sub-header'); ?>
0
votes
0answers
122 views

How to show twitter link preview (Card View)

I want to ask about my problem. I can't show twitter link preview for my website and for information, I just add this code i get from WP Beginners <?php #twitter cards hack if(is_single() |...
1
vote
1answer
88 views

My php header() function is not working [closed]

// Edit: I figured it out. Hours and hours of banging my head against a wall and it turns out all this needed was one simple line: ob_clean(); Somewhere in some included file there's probably one ...
0
votes
1answer
89 views

Custom CSV exporter - Cannot modify header information - headers

In my admin dashboard, i created a custom module for report filtering using custom queries. I need to add another functionality which is to export these results to CSV. I tried to create a very simple ...
-1
votes
1answer
263 views

Change the headers content type with wp_remote_post

Working with the remote API requests with WordPress. I have used wp_remote_post() function to request the HTTP data but I am unable to update the headers Content-type I am using the following code ...
0
votes
1answer
21 views

Dangers to allowing Access-Control-Allow-Origin: * for Feeds only?

I want to use a function like this to allow access to the feeds from a variety of services but my knowledge of the security implications is limited. I think I'm being safe by limiting the access to ...
-2
votes
1answer
23 views

How to get customable image header?

I'm creating new responsive theme. How do I get customable theme header image with text inside the image? For ie. Site title in the header image. I read about using add_theme_support( 'custom-header'...
0
votes
1answer
87 views

linking stylesheets and scripts with functions.php

I am following along with this tutorial. I am trying to link the javascript and css files that are usually linked in the header using wp_enqueue_scripts in functions.php. With what I have now, only a ...
0
votes
1answer
33 views

How can I prevent the Search Results Page from changing title?

I am trying to add the search feature to our site. I have the search feature located in the desired position on the page so I'm happy with that. My problem is that when the results are displayed, ...
0
votes
3answers
50 views

Need help with Access-Control-Allow-Origin

I have a little problem, I created a wordpress theme with documentation created with the site helpscout, to reduce the number of support ticket, I would like to do the same thing EDD: https://...
1
vote
1answer
217 views

Putting content into header.php without using wp_head

I am building a plugin. I have to output certain stuff in the header.php file of the theme depending on if/else I will write. However I am not at that point yet. I just learned in order to push the ...
0
votes
1answer
33 views

Requiring login for specific pages

I have 2 lines of code in my header.php file that exclude the header from an array of pages. The code looks like this: <?php if ( ! is_page( array ( 3599,3653,3684,3732,3737,3758, 3769 ) ) ) { ?&...
1
vote
1answer
216 views

Editing Header Titles of each details in woocommerce Order Email [closed]

I'm using flatsome theme, woocommerce plugin. On my thank you page I get the bank details, order details and customer details etc. but on customer order email, header TITLES of those details are ...
3
votes
2answers
58 views

Theme option : having the ability to select among several predefined headers

I'm in the process of creating my first theme, and I'm using Quark as a starter theme. I would like the theme to have various options, one being header selection. (let's say 5 different headers - ...
-2
votes
1answer
545 views

End of script output before headers - multiple apache error_log errors

Not sure if these two problems are related but let me start with the title problem. Before you downvote for server related Q - if I put this on SE they will say it's wordpress specific due to the ...
1
vote
1answer
93 views

Sharing Header Components Across Multisite

I have a multi-site platform and I'm trying to share the menu that I have in main with other sites that are located in different folders. This is the PHP tag in the main that pulls the menu which I ...
0
votes
0answers
141 views

Access Control Allow Origin problem with CORS

I'm at wit's end. We're using CORS to go back and forth between a .NET environment and a WP/BuddyPress environment. I've added the Access-Control rule to the header in index.php, with no wildcard. ...
0
votes
0answers
201 views

Cannat load admin-ajax.php. No access-control allow origin*

XMLHttpRequest cannot load ..../wp-admin/admin-ajax.php.,. No 'Access-Control-Allow-Origin' header is present on ... When on local WAMP it worked just to put header("Access-Control-Allow-Origin: *...
3
votes
1answer
34 views

Is it wrong to put header tags inside WordPress help tabs?

We're working on improving accessibility in our plugin. One of the rules for accessibility is apparently that you should have an h1 tag before any h2 or h3 tags etc. Normally that makes sense, except ...
0
votes
1answer
82 views

How to add css option to Header Image customizer?

I have added the Custom Header Theme Option to the Rowling theme. It works fine but I want to extend this by adding CSS controls in the customizer for backgound-size, and background-position. Please ...
6
votes
1answer
354 views

wp_headers vs send_headers. When to use each?

I've seen wp_headers and send_headers both used before for the same thing and I'm wondering how you're suppose to know which one to use and when... On the send_headers codex page there's an example ...
1
vote
0answers
107 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 ...
0
votes
1answer
219 views

How to set x-priority header = null while using plugin WP e-commerce?

I am looking for the files which are responsible for sending the email in WP e-commmerce, because i need to set the x-priority header = null I already tried a general function in functions.php ...
0
votes
1answer
33 views

Requiring wp-login.php sends headers automatically

I'm creating a custom password reset page on a site, and am trying to leverage retrieve_password() to send the reset email. Upon sending the reset email, I'd like to wp_redirect the user back to the ...
1
vote
1answer
603 views

How to remove rest api link: in http headers?

i would like to remove the "link:" line added to the http headers since wordpress 4.4 here is a curl -I killcandida.org here is the output extract of the line that i would like to delete: Link: ...
0
votes
0answers
19 views

Customize the header's image change on hover

-I am using the Twenty Twelve theme if that matters- What I try to do is add a custom field on Customization Menu where I will be able to pick the image I want in order to replace the header image (...
0
votes
0answers
24 views

My homepage is gone but header is still there

I just updated a page on the website, not the homepage, and then clicked to view the change. It was fine, but when I clicked to navigate to the homepage the only thing that was showing was my header ...
0
votes
1answer
61 views

How to add social follow button to header? [closed]

I'm using the theme "Awaken" and I need to add social follow button on the right side of the logo, just above the search box. Please see my website here. I have included the social button in the ...
0
votes
0answers
25 views

Error after saving or updating post

I am getting the following error every time I update or save a post: Warning: stripslashes() expects parameter 1 to be string, array given in /home/hridayay/public_html/wp-includes/formatting....
0
votes
0answers
111 views

Call PHP files like index.php?page=PAGEHERE

My main site calls PHP files like index.php?page=PAGEHERE and I am trying to get that to work with WordPress, but having trouble. Here's my website. Before clicking on the menu, you can see ...
0
votes
1answer
145 views

Create Post Using Form on WP Dashboard

As always, I have unique situations and client requests. I am working on a custom dashboard widget that will include a form to register for an event. Once the form is submitted, it will generate a ...
1
vote
0answers
27 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 ...
0
votes
3answers
60 views

Moving code from theme header to functions.php

Just wanted some advice in relation to adding some custom code to my wordpress site. I am using geoip to check a users country code and redirect them to the relevant site when they land on my homepage....
0
votes
0answers
61 views

Adding Section tag before get_header(); ?>

I am currently working on a WordPress theme using FoundationPress. I have created a custom homepage template which I have labelled home-page.php and assigned as my front page. I would like to make ...
0
votes
1answer
172 views

Fatal error: Call to undefined function get_header()

Hello WordPress Developers, I got this erros messages when I check my site like below mysite.com/wp-content/themes/mythemes When I visite that url, it give me this message Fatal error: Call to ...