Questions tagged [headers]

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
458 views

Unable to remove page from primary menu

A new page based on a default template always appears on the website primary navigation, however i is not included in the primary menu on the backend. Anyone knows what could be causing this and how ...
0
votes
2answers
92 views

In the Header.php file, is there a way to swap between one layout and another?

I want to have one header page for the front page of the site and all other pages that follow by clicking "next" and a different header for all other pages, categories, articles, etc. on the site. Is ...
1
vote
2answers
518 views

Getting wp_footer() to work without wp_head()

I have an external website that needs to load the header and footer from another site in Wordpress. I've managed to have this done with the following code: <?php require_once("wp-blog-header.php")...
0
votes
3answers
2k views

force download a file in template_redirect hook

in my functions.php file I've added a custom action for the template_redirect hook which must force download a file stored on the server. The code of the download works fine when it is in a simple PHP ...
0
votes
1answer
34 views

My single.php page does not show the related data to the post which is clicked

I have a post for my site's logo and I have inserted its thumbnail in my header.php using the code below and it works fine: <div id="logo"> <?php $my_query = new WP_Query('showposts=...
0
votes
1answer
911 views

White Screen on Site but wp-admin OK

I am hoping someone can help me - I have white screen on my whole site but wp-admin is full access and will update ok. I have done the following: Enabled debug in config - got errors around headers ...
-1
votes
1answer
1k views

Advanced Custom Fields for Header that are Editable from a Page [closed]

I am trying to make a phone numbers section, using advanced custom fields in my header. Currently with my source code below the phone numbers only show on the header when the home page is displayed. ...
0
votes
1answer
46 views

Responsive issue with secondary logo - not sticking in position [closed]

I have modified the header.php file and CSS to get a second logo working on my page here: dev.dutil.com/optilink-testpage It's the OptiLink logo on the right. At full screen, I've gotten it about ...
1
vote
1answer
1k views

Conditional Header in wordpress

I'm trying to modify the header in a theme for two specific custom post type. The header for all theme page is output from this code: <script> jQuery(function($){ $('.parallax-...
0
votes
1answer
26 views

How do I get my main image to stretch the full length of the screen?

I have been working on Twenty Sixteen WordPress theme and I accidentally changed something that is affecting my featured/header image. It used to stretch the full length of the screen but now it doesn'...
3
votes
3answers
2k views

URL Redirect and Bulk Actions in wp_list_table

I am using the Custom List Table Example plugin as a basis to create my own custom list table. Everything is great, except one thorny point. When I am processing bulk actions via the ...
0
votes
1answer
7k views

Sticky header for wordpress changes size and logo size as I scroll down

I am using Themify to construct my website. I have a parallax site partially constructed, however when I scroll down my logo and header changes size. It is a sticky header and goes from being ...
0
votes
1answer
876 views

Separate header for static home page and posts page

My custom headers are located in the folder /parts/header/ and header selection is controlled using theme panel, so I tried write like this in my header.php but came out blank header in static front ...
0
votes
1answer
101 views

add styles if custom header was included

I have template which includes(get_header("modern");) header-modern.php, i need to add styles(in functions.php) if included this header, how i can do this ? if(is_page_template('header-modern.php')){ ...
1
vote
1answer
62 views

add_image_size for header_image

How can I add image size for header_image() just like featured image by using add_image_size() What is the correct way of adding image size for header_image()
2
votes
1answer
2k views

How can I change HTTP headers only to posts of a specific category from a plugin

I have a plugin for injecting additional HTTP headers. It works fine with the following CODE: add_action( 'send_headers', 'jim_stop' ); function jim_stop() { header( 'Cache-Control: no-store, no-...
4
votes
1answer
3k views

Getting “Cannot modify header information - headers already sent” error on wp-admin only whenever any plugin is activated

I had this problem in this question and tried to isolate where the issue is coming from, but I am only more confused now. I'm trying to upgrade my site from the current WordPress 4.5.5. , but first, ...
3
votes
3answers
2k views

Setting Last Modified HTTP Header on static Home Page

In response to the question asked here I find myself and this other user needing a solution to set a last modified header that contains the date and time of the most reicent post. Since we both in ...
0
votes
1answer
1k views

Warning: Cannot modify header information – headers already sent

I've checked the offical "How do I solve the Headers already sent warning problem?" and have resolved a whitespace problem, changing: function mhm_footerheader_position () to function ...
0
votes
1answer
760 views

Changing an image in header.php

I am trying to change an image uploaded to a theme header created by the company that designed my website. I want to change the image to one that I have created, which isn't in the media library of ...
0
votes
1answer
31 views

Put image onto header

I'm using the new Twenty Seventeen Theme on WordPress and I want to insert an image with a link on top of the header. How can I do this? I tried messing around with the editor but no results. Any help?...
0
votes
2answers
796 views

video header in desktop view, image header in mobile view

In twenty seventeen, is there an easy way to show video header in desktop view, and show image header in mobile view ?
0
votes
1answer
40 views

Calling JavaScript for specific page irrespective of whichever theme you select

I recently added a JavaScript file that pulls JSON data and updates the div tag on specific page of my WordPress, now to apply the JavaScript file to the page I added to header tag in the theme and ...
0
votes
1answer
133 views

How to add some php code in header.php using plugin

is there any way to add some php code on top in header.php file, i want to add ob_start(); function in my theme header.php file using plugin. i used the following code but it not working add_action( ...
2
votes
2answers
1k views

Why I can't add a script-code into theme-settings without 403-forbidden?

we (my son and me) modified a script - '/js/sticky-menu.js' - and it only works when Cloudflare 'Rocket Loader' is off. Following the tutorial for Rocket Loader I tried to exclude the script by adding ...
0
votes
3answers
5k views

adding script tag in head of specific pages

I just added a new page which needed some javascript to pull json(with setInterval) and display content in that page div tag, On digging i discovered we can add script tag in themes/header.php file . ...
0
votes
0answers
10k views

expires header in w3 total cache

Hello i read about expires header and as i understand it's very important but it's dangers because visors will not see the changes that happen on my site, so my question can enable expires header and ...
0
votes
0answers
22 views

Making my category headers smaller

I have placed my categories as my header and I have 7 of them. However, they break into 2 lines. See picture below: Where do I go to make it smaller?
0
votes
1answer
276 views

Change header image on a particular page

In my WP Project i have used "Multiple Domain Mapping" Plugin & "Woocommerce" Plugin. In my child theme i'm mapping the url of the pages which has a top level product category "furniture" with ...
0
votes
1answer
41 views

Wordpress fountainpress header is covering top bar

I changed wordpress menu from admin panel and now is some part of menu behind header. How can I space out certain part of menu or move header little bit up?
3
votes
2answers
1k views

How can I get wp_head() as a string instead of echoing it?

I'm using PHP handlebars templates and would like to keep all of the HTML in the template file so I don't have a header.php but rather the handlebars looks like <html> <head> {{#...
0
votes
1answer
32 views

Header with content

I want to make a large header with logo, navigation and centered title and some text below. I dont know how to make that centered title and text below so that end user can edit title and text in admin ...
0
votes
0answers
18 views

Primary Menu doesn't show because of w3 cache

When I active w3 total cache, my site's primary menu doesn't load. Sometimes when my site takes some time to load only then menu appears.
0
votes
0answers
767 views

Force download of MP3 file in Safari

Seeing as I have an audio player on my page I don't want safari to open the download link in a new tab with another player, I want the mp3 file to download to their computer. My download link is ...
0
votes
2answers
1k views

Is_front_page inside header.php is always returning true

I have a page that I designated as my front page using the reading portion of settings in the dashboard. When I place a script inside of an if statement using is_front_page in functions.php, it only ...
0
votes
1answer
2k views

Generate <meta name=“description” Using the page title + first sentence of body text

So what I'd like to do is generate a meta description like this one <meta name="description" content="[post_title]Craftsman 3 in 1 tool set. [post_content]This is a sentence or a few words from ...
0
votes
1answer
1k views

How do you find the logo code on theme file or where can I find the header theme file?

I am trying to find the header.php file and/or the code for the logo on any theme file. Under appearance- editor section of my website ( www.pithandsubstance.com ) I can only find function.php and ...
0
votes
2answers
2k views

If is single in header.php [duplicate]

I wanna do a query in my header.php inside "head" to generate a title. I wanna ask, if the current page is single an do it like it follows: <?php if ( is_single() ) { ?> <title>Test</...
0
votes
1answer
733 views

Header and footer fail to load with SSL and custom links

I have an existing site that I am now trying to secure, but I'm running into problems with the header and footer on the pages that are accessed via custom links in the menu. When I try to access a ...
0
votes
1answer
151 views

Correct meta of Writing Meta Tags

How to write this Head section thing correctly in Wordpress. <meta name="author" content="The Zebra Team"> <meta name="description" content="The Zebra Team"> I was doing it like this - ...
0
votes
0answers
7k views

Fixing Access-Control-Allow-Origin (CORS origin) for multiple subdomains

Following from my previous question Is it safe to fix Access-Control-Allow-Origin (CORS origin) errors with a php header directive? The only solution that worked for me was: header("Access-Control-...
5
votes
2answers
21k views

Is it safe to fix Access-Control-Allow-Origin (CORS origin) errors with a php header directive?

I am trying to show a Formidable Pro Form from a WordPress site to the other. I followed the developer's API and the REST API, but faced a CORS problem. Then I found a suggestion on a forum thread ...
1
vote
1answer
8k views

Creating a WordPress form with a PHP script and default header

I am trying to create a custom form in WordPress. Step 1 of the form is HTML code that collects data and sends it to a PHP file through the post method, and then writes it to the MySQL database and ...
1
vote
1answer
297 views

Trying to integrate Zoho Campaign Form [closed]

So the Zoho Campaigns Plug-in doesn't work and causes issues with Slider Revolution. I ditched the plug-in and got the code from Zoho Campaign. It needs to be integrated and the header code from ...
3
votes
3answers
1k views

How to remove/hide action links cluttering under specific plugins' names

Some plugins place various links under their name on the primary column on the plugin page. So we end up with something like: Home Page | Support Forums | Documentation | Upgrade to Pro Edition | ...
0
votes
1answer
1k views

Moving the search bar to be in menu bar

Our website is in the middle of a major overhaul. We are using a custom search bar through our industry research tool (on the homepage right now at the very top) and I currently have it in the header ...
0
votes
1answer
426 views

Set cookie so user sees alert banner/popup only once

The site I am working on uses banner/popup alerts for emergency situations in the community. I need to set a cookie so the user sees the alert only once, and upon closing the alert won't see it again. ...
0
votes
2answers
32 views

Social icons on my index page don't take visitor to specific site(s) [closed]

My index page has three button on top upper right corner. They are Facebook, Twitter and RSS. I have accessed my header.php to add the appropriate URL's for both Facebook & Twitter (I did not add ...
0
votes
1answer
57 views

Insert Plugin on a custom page

May I know if I can insert curtain plugin on a page. For example, if I edit page header.php. How do I want to insert a plugin on that page. The plugin that I want to use is Huge IT Image Gallery. I ...
0
votes
2answers
3k views

'Headers already sent' Error When Redirecting from add_submenu_page() Callback

This is a very common issue, but all the answers I read don't relate to what's happening in my case. I'm writing a custom plugin that reads and writes/updates data to a custom database table (it's ...

1
3 4
5
6 7
12