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)

1
vote
2answers
2k views

Add social icons in a theme through custom admin menu

Is it possible to make a theme with an option of configuring social icons with links through the custom header control panel? I googled it and found nothing that could help me, any help on that topic ...
2
votes
1answer
1k views

Using PHP to toggle stylesheet and header image, set in cookie

I haven't done a lot of work with cookies or Wordpress before so I think I've been a bit over-optimistic in my quest :p I have created two themes for my site, night and day. I would like the user to ...
1
vote
1answer
66 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
32 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 ...
1
vote
1answer
1k views

Is there a way to enable Cross-Origin Resource Sharing for WordPress' ajaxurl?

WordPress already has a default URL for jQuery-WordPress application calls and it's well known as the ajaxurl. However, there are cases wherein one would need to enable Cross-Origin Resource Sharing ...
0
votes
1answer
8 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
1answer
791 views

Changing logo image in header.php upon language detection

So i'm designing a website that will feature the Polylang plugin for automatic language detection, but I've run into a bit of a wall with the logo image. It resides in header.php, but I can't think of ...
2
votes
3answers
779 views

How do I make my plugin load before the headers are output so I can redirect wordpress?

I wrote some code, that helps secure my clients files, and added it to wordpresses function file. however, whenever updates come in, it obviously overwrites my function. So I wanted to create it as a ...
1
vote
2answers
728 views

3 blogs on one site with the same header menu?

Person X has default SITE with an integral blog. Person X also has SITE 2 with Blog 2 and also SITE 3 with Blog 3. Is it possible to have on the DEFAULT SITE HEADER MENU something like this: HOME ...
1
vote
2answers
1k views

How do you log a user out with wp_logout?

I can get wp_logout to work, but not without generating lots of warnings ('PHP warning: Cannot modify header information - headers already sent'). wp_logout calls wp_clear_auth_cookie, which calls ...
1
vote
1answer
71 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
4answers
34 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
48 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() ...
0
votes
1answer
25 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 ...
20
votes
5answers
15k views

Why won't wp_mail() let me set the From: header when plain old PHP mail() will?

When I use wp_mail( $to, $subject, $message, $headers ) (with values in place, of course), the email gets sent with a from name and email that isn't set anywhere I can find (not even in PHP or Apache ...
-1
votes
1answer
52 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
17 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( ...
0
votes
1answer
49 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
30 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
29 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: ...
2
votes
2answers
4k views

Call to undefined function get_header() in index.php

I am trying to create a theme. I created a header.php file and call this file in index.php using <?php get_header();?> When I try to run my index.php file it shows this error: Call to ...
1
vote
1answer
134 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
90 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
52 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 - ...
0
votes
1answer
159 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
42 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
118 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
1answer
61 views

Redirect to another page not working SOLVED!

I have a custom page template (1 file only, contains with CSS, HTML and PHP) with a form and it will send an email after the user click the submit button and it will redirect also to another page. ...
3
votes
3answers
17k views

How to add code to Header.php in a child theme?

I'm creating a child theme for the first time and I had a few questions regarding code added to header. In a non child theme there is certain code I add to my header.php file such as google ...
0
votes
0answers
53 views

Full Width Featured Image Above Content & Sidebar On Posts

guys/gals I'm using the JustWrite theme and I am trying to figure out how to add a hero (or full width) image via functions.php in my child theme. All I want to do is grab the featured image from ...
0
votes
0answers
105 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
32 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
52 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 ...
7
votes
8answers
9k views

Wordpress Plugin Development - Headers Already Sent Message

I'm developing Wordpress plugins. When i activate my plugin, i'm getting a message The plugin generated 293 characters of unexpected output during activation. If you notice “headers already ...
7
votes
4answers
5k views

WP function/filter for modifying http headers?

Is there a dedicated WP function, action or filter to use when adding/modifying the HTTP headers? For now I just hook a PHP header() call into the WP 'init' hook like this: add_action('init', ...
6
votes
1answer
220 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
67 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
206 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
26 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 ...
2
votes
3answers
11k views

Admin bar and fixed header issue?

I've styled my header to have a fixed top position. While logged in to wordpress, the wp admin nav bar covers the top section of my header making imposible to access my top navigation. I would like ...
1
vote
1answer
412 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
15 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 ...
1
vote
3answers
985 views

Indenting (tabbing) WP_head

Right now all the stuff that gets included in wp_head are left justified all the way in the code view. Whereas all my other code that is around the wp_head is indented (tabbed) two times. Is it ...
1
vote
1answer
913 views

If Modified Since HTTP Header

I am trying to enable 304 If Modified Since HTTP header in my WordPress site. After doing lot of Googling I find out a site where the author said to put the following line at the very end of wordpress ...
0
votes
0answers
346 views

Editing Header Size of Listify Listings

Looking to edit the default header size of the listify theme I am using. Example of the header image size I am looking to edit: ...
0
votes
1answer
42 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
1answer
96 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 ...