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
votes
0answers
8 views

Replace iframe with php for implementing common header/footer

I have a multisite WP and have utilized iframe for common headers and footers. But when pages load on other sites than main there is a delay in loading header and footer. Here is the code I have in ...
0
votes
0answers
4 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( ...
-2
votes
1answer
10 views

Logo responsive and background image

I am working on this website: basic3.vhginternet.com There are 3 things I am not able to fix: How can I make the logo responsive? There is a huge white space on the right side (scroll the ...
0
votes
1answer
12 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
0answers
17 views

What templates does woocommerce.php use? [closed]

I'm using the Engrave-Lite theme, which does not support WooCommerce. So I created a Child Theme and created a woocommerce.php by editing the page.php. So all good. However, I want to edit the ...
0
votes
2answers
559 views

Editing page content through FTP?

I currently work with a graphic designer and code primarily HTML/CSS for clients looking to develop a web presence. I don't know much about WordPress. I have a client who wants some minimal changes ...
1
vote
2answers
588 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 ...
0
votes
1answer
422 views

Add access control origin header information across multisite

I want to add the below snippet to my wordpress installation. <?php header("Access-Control-Allow-Origin: *");?> I don't want to add it in every template header as there are many of them and I ...
0
votes
2answers
22 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', ...
1
vote
2answers
204 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
0answers
17 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
1answer
730 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 ...
0
votes
1answer
31 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
26 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
39 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
44 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
16 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
57 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
134 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 ...
0
votes
2answers
100 views

Object method calling for global $wpdb in header.php

I am developing a Wordpress plugin in an object oriented way, and I would like to read data from the wordpress database using the global $wpdb variable. The global $wpdb variable is called from ...
0
votes
2answers
27 views

Code to Show for One post only in head

I want to add this code only for one post before </head> <link rel="alternate" hreflang="en-gb" href="http://abc.com"/> What code shall i use?
-1
votes
1answer
58 views

Cannot modify header information - headers already sent by

I am getting this error, when I am doing example.com/wp-admin Warning: Cannot modify header information - headers already sent by (output started at ...
0
votes
0answers
83 views

“imagejpeg” function is not working in wordpress

$image = imagecreatefromjpeg('http://localhost/test/wp-content/uploads/2014/09/city_81.jpg'); // choose a color for the ellipse $ellipseColor = imagecolorallocate($image, 0, 0, 255); // draw the ...
2
votes
2answers
5k views

Where is get_header('shop') file in Woocommerce templates

I need to modify the get_header('shop') file in Woocommerce but don't know where it's located, if someone knows please help me out - thanks!
0
votes
0answers
12 views

Checking if certain header meta data is set

I'm trying to see whether <meta property="og:title" content="..."> and other OG properties are included inside the <head> of a WordPress site. Does anyone have an idea on how to do that? ...
0
votes
1answer
69 views

Loading second header.php for other homepage showing double header.

I am loading second header.php for other homepage but it displaying double header. this is how i call the second header <?php get_header('secondheader'); ?> and file name is: ...
0
votes
1answer
52 views

Admin first hook that outputs HTML?

I think load-(page) is the first hook in the admin screen that deals with outputting HTML, but I'm not totally sure. Basically I'm looking for the equivalent to template_rediect or get_header, which ...
0
votes
1answer
58 views

How do I add Facebook OpenGraph meta tags for attachments in the header for a custom theme?

How do I add Facebook OpenGraph tags in the header when the header has already been called, and the values I need to add are obtained in the body? This is a highly customized theme (which I did not ...
0
votes
0answers
29 views

setCookie before headers are sent?

I was using this code in my plugin to set a cookie if a condition was met, however after updating to Wordpress 4.0 I got the message: Warning: Cannot modify header information - headers already sent ...
0
votes
6answers
3k views

Add code into <head> on a per page/post basis

Is there plugin (or an easyish way) to add code to the <head> section on a per page/post basis? I have a multilingual website and I need to implement the rel="alternate" hreflang markup, so ...
1
vote
1answer
117 views

Proper way to pass credentials in a custom login form to avoid “headers already sent”

I'm working on a custom login page plugin. I'm trying to figure out how to log the user in without creating "headers already sent" errors. I was calling wp_signon directly after the user clicked ...
0
votes
1answer
19 views

Download custom file in wordpress backend [duplicate]

I tried to implement a custom download link in the theme settings, section that will give the users to download there custom settings for the backup. I tried this option if( isset($_GET['download']) ...
0
votes
3answers
637 views

Getting redirect to happen before header output

Anyone know of a way to trick WordPress into doing a header location redirect. I have to check whether users are logged in or not, and if not redirect them to our organizations authorization system ...
0
votes
1answer
43 views

Logo is not being displayed in header (Twentytwelve)

So I have a image tag in the header.php of the Wordpress theme Twentytwelve like this: <header id="masthead" class="site-header" role="banner"> <hgroup> <img ...
-1
votes
2answers
95 views

Adding header logo instead of text

I want to add Header logo instead of the text "physics for All " in the following site. I think , i have to add my logo to my site then , i will have to insert the image link to the header.php ...
2
votes
3answers
8k 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
94 views

wordpress head is empty, append to body

i'm have a problem for Wordpress heading. my get_header(); <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html ...
0
votes
2answers
41 views

Removing old code from header

In our site, we've got some old code sitting in the header. I'm guessing it originated from a plugin we used to use (embedding Scribd content into the site), but we are no longer using it. ...
0
votes
2answers
1k views

Remove sticky behavior from top navigation on twenty fourteen theme?

In wordpress theme twentyfourteen, I am wondering how to remove the sticky behavior of the top navigation with a 100% width header background image like this site? I would love to have a top image ...
1
vote
5answers
2k views

The plugin generated 80 characters of unexpected output!

I'm getting this message each time I activate my plugin: The plugin generated 80 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with ...
0
votes
0answers
53 views

Showing just the menu toggle next to logo in twenty fourteen

For mobile, I want to eliminate the black menu bar, search box/icon and move the menu toggle up so that on mobile, my site just has the logo and the menu toggle. This gives a bit more room for ...
1
vote
0answers
298 views

wp-comments-post.php file returns a blank page

When i post a reply to my blog, it's return a blank page to me. It seems that happens because of this code in wp-comments-post.php if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { header('Allow: ...
2
votes
3answers
4k views

How to prevent wordpress from loading old versions of jquery in wp_head();?

I noticed my twenty twelve theme is including outdated versions of jquery and js so I want to replace the scripts with the newer versions, however the scripts are in the file included by wp_head() ...
0
votes
2answers
157 views

Programmatically log in a wordpress user

I am trying to programmatically log in a wordpress user, using the following function for that. public function auto_login( $user ) { $username = $user; if ( ...
1
vote
1answer
184 views

How to set twenty fourteen header image at 100% width?

if function wpse_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'wpse_header_args', array( 'width' => 1460, 'height' => ...
2
votes
2answers
363 views

How to stop loading multiple copies of jquery

My wordpress header.php and function.php is given below.please help me to modify my php code to stop problems due to loading jquery multiple times. My plugins and themes are loading jquery multiple ...
0
votes
2answers
3k views

Why I am having error Call to undefined function get_header()?

I am using twenty eleven for my theme and I create a PHP page under it named results.php in the results.php here's my code: <?php get_header(); ?> <?php get_footer(); ?> From my ...
2
votes
1answer
124 views

Strip HTML comments from plugins in header/footer

Would anyone know a function or how to remove <!-- plugin inserted stuff--> from the header and footer so that they won't be visible when viewing source?
0
votes
0answers
55 views

Using Wordpress header in a moodle site

Hello I am trying to use the wordpress header inside Moodle instead of using the menu in the theme we are using. I have tried adding it using this php code below in the header.php file of the moodle ...
0
votes
1answer
52 views

link header to homepage (for wp multisite)

I am using the genesis framework and have added this code to change the way genesis uploads a header image: remove_action( 'wp_head', 'genesis_custom_header_style' ); add_action( 'genesis_header', ...