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.
577
questions
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
824 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
93 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
60 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
1k 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
597 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
30 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
767 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
128 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
4k 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
275 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
40 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?
2
votes
1answer
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
31 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
17 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
758 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
1k 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
691 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
148 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
20k 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
7k 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
295 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
928 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
413 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
54 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
2k 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 ...
2
votes
1answer
739 views
Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files
Just see the following code snippet. I have came across this in one of the plugins that I am reading now.
if ( ! defined( 'ABSPATH' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 ...
0
votes
1answer
643 views
Changing header banner dimension in child theme
I'm using Twenty Thirteen Child theme for my website running WP 4.5.3. I would like to change the header banner dimension to 900x480.
The content of my twentythirteen-child/functions.php:
<?php
...
1
vote
0answers
1k views
Creating dynamic header and footer files
I have an external search engine and I need to create a page to add it to my site.
The page will sit on an external server, on an external URL.
They are copying in the HTML header and footer but ...
0
votes
2answers
1k views
menu-item class missing on wordpress menu
I have this code in my header.php and its working properly except showing li's without menu-item class, its showing them with page-item instead. this is when i dont have a menu created from admin and ...
3
votes
0answers
42 views
HTTP Header on specific page is application instead of text
Problem: clicking on (WP site that I developed) webejeeping.com/vehicles/ causes the generated php file to be downloaded instead of being rendered in the browser. MIME Type returns as "application/...
2
votes
2answers
2k views
Add custom HTML to posts page
I want to add a header image via some custom HTML to the posts page but can't edit it with the pages menu in Wordpress.
Is there a way to add the HTML in the specific PHP-File and which PHP do I have ...
2
votes
1answer
6k views
Wordpress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]
I downloaded a WordPress theme recently, and I tried to run it, but it gives me a fatal error showing a call to undefined fatal error(). Why is this error generated?
I am new to WordPress theme ...
1
vote
3answers
12k views
Using ob_start() in plugin
I'm learning how to build a WordPress plugin. In the sample plugin code, I have this PHP/HTML:
ob_start();
// other plugin code
<?php function plugin_rvce_options_page() { ?>
<div>
...
-1
votes
2answers
1k views
Javascript not working on index.php but it is working on single post's page
I am trying to use mathJax in my wordpress. According to the documentation at mathjax, the mathjax script url needs to mentioned in headers.php.
Which is exactly what I did. And right now this is what ...