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

Header appears twice

I've simple custom page template like this: get_header(); include('pages/index.php'); get_footer(); index.php looks like this. if(!(isset($_POST['full_name']) && $_POST['full_name'] != ...
0
votes
1answer
28 views

WordPress Get Header and Footer using in Admin Area

I was wanting a way to get the site header and footer and use it in the admin area. Idea #1 An answer to another related question states to use an iframe instead I think we can use an ajax call get ...
-1
votes
1answer
17 views

Custom Header won't Repeat

I have tried everything I can think of to get my custom header to simply repeat horizontally. Here is the website. If you zoom the page out you can see what I mean. The top black bar does, and the ...
0
votes
0answers
21 views

How to edit the response header of a post/page?

I am rendering a post/page differently. Instead of displaying an HTML document, I am making the page render a javascript code. The default content type of a wordpress post/page is text/html, is there ...
0
votes
1answer
23 views

Empty header tags [closed]

When I set the 'posts for page' option to a specific page, then that page gets an empty header and the page is not structured. The site has a customized theme of twenty eleven. Could someone point ...
0
votes
0answers
42 views

Cannot send session cache limiter - Headers Already Sent

Error Messages is as follows : Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ...
3
votes
1answer
46 views

Wp_head and wp_footer vs wp_enqueue_script javascript files?

I'm converting a bootstrap html website into Wordpress. Now, all recommend using wp_enqueue_script() for registering javascript files. i.e. function themeslug_enqueue_script() { ...
0
votes
3answers
95 views

Headers already sent error after upgrading wordpress to 4.2.2

in wordpress version 3.6 and 3.7 everything works great, but with version 4 and above I get: Cannot modify header information - headers already sent the problem line is: header('Location: '. ...
0
votes
0answers
12 views

Editing the header tag for upcoming posts

i want to change my wordpress blog header file so that every new post that i publish should have that particular custom code within the header file without me having to change is manually for each ...
0
votes
1answer
28 views

Insert Facebook button into header [closed]

I am trying to add a Facebook button to the center of my header image. I have tried adding a link to my header.php on different sections, but it either displays the button above or beneath the logo, ...
1
vote
1answer
74 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 ...
0
votes
1answer
63 views

Change header menu login-logout without changing main menu

I'm trying to change the header menu, such that it looks different when it is logged in and logged out, without changing the main menu. function my_wp_nav_menu_args( $args = '' ) { if( ...
0
votes
1answer
17 views

Reduce Page loading time

am trying to reduce page loading time by flush() php function just before in header.php wordpress file. Am using W3TC and CDN so that will work or it will be an unused modification?
0
votes
1answer
19 views

What is this HTTP_REFERRER “WordPress/4.1.2”

On our website we have huge traffic with same IP and referrer "WordPress/4.1.2; http://www.xxxx.com". The log line looks like: 62.24.2.2 - - [22/Apr/2015:17:28:15 +0200] "GET ...
0
votes
0answers
34 views

Headers Already Sent

I know this is a favorite error! I understand the principles but I can't see why this code would create this error. page.php includes a get_template_part. I have a test page that renders and does a ...
0
votes
1answer
27 views

Where are the contents of WP_Head

I'm building a theme based on underscores. In the header I'm finding some code for a margin-top but I can't seem to find the source in order to get rid of it. I looked in functions hoping it was ...
0
votes
1answer
44 views

Changing header text from uppercase to normal [closed]

All header text is uppercase. In main-style.css this works: h1, h2, h3, h4, h5, h6 { margin:0; text-transform:none; } but, when I do any changes in Appearance > Customize or in Cherry ...
0
votes
0answers
58 views

Save_post action hook using the add_settings_error function leads the “cannot modify header…” warning

I am fiddling on that for quite a while. I've asked a similar question already over here. Since then i've dropped according to recommendation the transition_post_status action hook as well as the ...
0
votes
0answers
10 views

Fade In/Out Header Isn't Working in Wordpress [duplicate]

The following code works in an HTML file, but doesn't work when I put it into Wordpress, so I'm assuming I'm doing something wrong according to the Wordpress framework. Here's my Code: ...
1
vote
1answer
58 views

An echo line in a transition_post_status action leads to “cannot modify header information - headers already sent by”

I tried to set up an action hook with transition_post_status. Inside I wanted to set up a few conditional statements. To see if everything works I wanted to place a debug statement. Problem is as soon ...
0
votes
1answer
23 views

How to use only scripts from new theme?

I'm a bit new to WordPress so please forgive me if is a duplicate question. I created new theme with simple file structure: functions.php footer.php header.php index.php style.css js/ I'm trying to ...
0
votes
0answers
50 views

Create Notification on Top Bar

I want insert to top on wrapper and top wp admin bar, like this: http://getconversion.com/products/gc-message-bar/ but i always fail... Can i use jquery prepend after body? <style> ...
0
votes
1answer
34 views

How can I selectively insert a header for my shop page in woocommerce? [closed]

I use a this line of code in my sites in order to change my header (and hence my css) depending on what template I'm using: <?php include ('otherHeader.php'); ?> however, with woocommerce ...
0
votes
1answer
29 views

Create a google friendly header with text and logo

I want to customize my current header in wordpress and include a logo in it. The following solution works: <header class="site-header"> <div class="wrap"> <a ...
0
votes
3answers
584 views

wp_redirect() - headers already sent

I am trying to use wp_redirect() to redirect the user after successfully submitting a signup form on the page. It's not working and shows the following error: Warning: Cannot modify header ...
0
votes
0answers
59 views

Add login and register controls at the header top right corner

I want to add login and register at the top right corner in the main menu of wordpress site. So is there a plugin out there which can do this and login and password textboxes should show horizontally ...
0
votes
2answers
53 views

Import a header template from another theme

I have a multisite WordPress project with a main site using Theme A and all 'sub'-sites using Theme B. Both Theme A and Theme B are Child Themes. I want to import the header file from Theme A into ...
0
votes
1answer
13 views

show wordpress data without headers

I need to use list of posts from wordpress in my project to generate XML. I have my own php script. In this script i use require_once ('wp-blog-header.php'); and i am retrieving list of posts ...
0
votes
2answers
46 views

How to add Post Tags to a new <meta> element in header.php?

How to add Post Tags inside a new element in header.php? I'm probably overlooking an obvious function in the WordPress Codex. I have tried adding these to header.php: <meta name="page-tags" ...
0
votes
1answer
31 views

Top Nav submenus wpon't stay open - only in FF and only sometimes [closed]

I've been up and down my header and nav trying to find why the top nav submenus won't stay open about 50% of the time. This doesn't happen in any other browser, but it's a significant enough issue in ...
0
votes
1answer
39 views

save_post hook - headers already sent?

I'm trying to create a very simple alert for each time a post is created or updated with the below... add_action( 'save_post', 'updatedAlert' ); function updatedAlert() { echo ...
1
vote
0answers
83 views

Wordpress 4.1 header image problem

I want to use a moving .gif as my header image in wordpress 4.1. In previous versions I could skip the cropping step and leave the image as is, and it would let me pick a moving gif as my header ...
2
votes
2answers
320 views

Loading different JS for http and https

I'm using a third party JS file. And they have both http and https version. My site have some pages loading in https while most of pages are in http. Now my question is could I do something in ...
0
votes
2answers
127 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 ...
0
votes
0answers
18 views

Most optimal way of starting fresh, without using other theme or dropping old files?

I have an unusual situation: A website with very trashed styles.css (thousands of lines of trashy code), around 70+ custom templates, tons of js libraries loaded. First reaction was, lets start fresh ...
0
votes
0answers
59 views

Possible to add author avatar to header so displays for all, not just registered/logged users?

I have a wordpress site and here is the page where I am trying to display the avatar & user name in the header, listmenow.com/default Is it possible to display the avatar & user name for the ...
2
votes
1answer
640 views

Why is there a link tag with rel “profile” pointing to gmpg.org?

I found this <link rel="profile" href="http://gmpg.org/xfn/11"> in header.php file of WordPress theme. What will happen if I don't use this? What will happen if I use this ?
0
votes
1answer
358 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
28 views

Getting comment-reply to load

I am trying to get the comment-reply.js script to work, and at the moment I am having problems including it in my pages. Currently, I am using the following in my header.php file: <?php if( ...
0
votes
1answer
109 views

Different custom header image on different page

I am now creating a website for my client, this client wants me to make each page of the section of header image able to be easily uploaded by them in wordpress admin panel. This is the code I have ...
0
votes
2answers
101 views

Enqueue stylesheet in plugin for wp-login.php

What I have: A basic plugin that's calling a stylesheet contained in the plugin folder: function my_login_enqueues() { // First attempt: //wp_enqueue_style( 'custom-login', ...
0
votes
0answers
31 views

Override theme metadata in header

I've recently purchased and heavily customized a new WP theme, but am having problems with metadata. When posting a link to the in Facebook, the meta data pulls in the theme author name ... As we've ...
1
vote
3answers
13k views

Can't get a JSON object in response to an ajax request with wp_ajax

I have a problem with WordPress and ajax. This is my javascript part (I trimmed it a bit): var posts = $.ajax({ type: 'POST', url: ajaxurl, async: false, dataType: 'json', data: ...
0
votes
1answer
109 views

Empty lines in header, how to remove them

I'm making a theme from the _underscores theme, and after some development there are some empty lines in the header tag that I dont know where are they coming from. I suppouse that something is ...
0
votes
1answer
55 views

JQuery Plugins in Wordpress

I have been able to somewhat piece together how this should be done but I am really struggling with it. I want to use the Table Sorter plugin (http://tablesorter.com) in a custom Page Template to ...
0
votes
0answers
45 views

extra code in <head> - blank jquery function

I recently noticed that in the of my website (goinspire.com), there are 2 occurrences of the following code: <script>jQuery(function(){});</script> It looks like a script with a blank ...
0
votes
0answers
103 views

wp_mail() header From is not working

I created a contact form for my website which works fine except for one thing. The From header is not working correctly. Instead of using the $contact_name it uses my domain name as the name. I have ...
0
votes
1answer
89 views

Header Image instead of dynamic text

i'd like to change the dynamic text in the header that makes the title of the site with a logo i've designed. how do i edit this code to achieve this? <div id="logo"> <?php ...
0
votes
1answer
167 views

Headers already sent when I try to add headers via a shortcode

I've run into a headers already send problem while adding functionality to one of my plugins. I wish to send my 301 redirect header after some checks to deteremine if the contents of the page is ...
0
votes
1answer
1k views

Benefits to using CSS for header image instead of html img tag [closed]

I would just like to find out if there are any benefits to using css {background-image url();} instead using an img tag in the html when setting a header. I am using the Genesis framework on a ...