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
2answers
13 views

Is there a way to get minimal Wordpress functions for iframed content?

I have a bit of content in a PHP file that is designed to live inside an iframe on another page. The PHP file is very simple-- here it is in its entirety right now: <div class="content-tos"> ...
0
votes
0answers
16 views

Menu widget not showing on search.php page via get_header(); function

I have the following code in the header.php file which renders the main menu: <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Main Menu')) : else : ?> ...
0
votes
0answers
13 views

Adding skin script ads to header in multisite

I need to know where in the header.php I can insert a script ads so it looks like the background (the classic advertising side to a site boxed.) I am a multi-site thought to use a facility code like ...
0
votes
1answer
36 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
0answers
5 views

Is there anyway to change meta tags in a plugin?

I need to change og:title and og:description meta tags inside a plugin I'm developing. It must override these tags in the case they're wrote by other plugins, like Yoast SEO. Is that possible?
0
votes
1answer
36 views

get_header() in backend - but keep JavaScript and CSS files

I replaced the header and footer in the backend with those from the frontend by the following code: /* add header to backend */ function header_backend() { get_header(); } ...
0
votes
1answer
23 views

How do I add a search bar to my header?

I need to add a functioning search bar to my header. I have read through the forums but am unsure what code I need to put where. For instance, where do I put the css code versus where do I put the ...
0
votes
2answers
30 views

How to remove header images from displaying (not css or editing)?

I removed/unregistered the theme (BirdTIPS) header images, but the default header image is still displayed. How to remove it programmatically (not css or editing header.php)? My code: add_action( ...
0
votes
1answer
38 views

How to use the conditional homepage tag

I'm trying to display a video in the header of the homepage only but struggling to figure out the correct code. This is the code for the video tag, which seems to be working fine if ( is_home() ) { ...
0
votes
1answer
35 views

Change directory where get_header(), get_footer() and get_sidebar() look for templates

I'm creating my own theme framework, and I want to organize my code, separating the partials files from the pages. But I want to do that and still use the native functions get_header(), get_footer() ...
0
votes
0answers
16 views

AJAXed function does not like sending mails with certain headers?

Out of all the emails below, only the one with 2024 gets sent when I ajax to the function that contains the code below. And none of the wordpress email gets sent even though other wordpress functions ...
0
votes
1answer
33 views

Perform a redirect after user action

Is it possible to redirect a user in WP without the header/wp_redirect being before header()? I have a plugin that allows users to manage content they have created on the site... for example, they ...
0
votes
0answers
24 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
41 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
22 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
35 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
29 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
89 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
67 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
149 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
40 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
199 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
86 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
19 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
31 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
37 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
33 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
54 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
88 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
64 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
29 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
70 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
52 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
37 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
1k 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
71 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
81 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
14 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
55 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
45 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
49 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
86 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 ...
3
votes
2answers
363 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
196 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
70 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
932 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
453 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 ...