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
1answer
598 views

Insert stylesheet into WordPress header?

I just want to add one extra line (a third-party font stylesheet) to the header of my blog. I have a child theme set up, but at the moment it only has a custom stylesheet, style.css. Very simply, ...
0
votes
1answer
3k views

Pictures won't display in media library and also won't show preview when selected

I have done the plug in, check permissions (upload folder which contains files for the media contents is 755), clearing cache (there was none, apparently), disable any extra plug-ins, check and ...
-1
votes
2answers
2k views

How can I add a google play badge to my header and footer?

How I can add images or edit html for the header and footers within wordpress. I am looking in the header and footer sections under both "Theme Panel" and "Appearance" but can't figure out how to ...
0
votes
0answers
19 views

my dashboard does not have the option to fix the header or change the theme. how can i get that to show?

when I pull up my site to edit the pages there is no choice to work on the header or change a theme etc. I can not edit my home page, make any additions to it. I can change the rest of my pages just ...
1
vote
1answer
122 views

Insert custom PHP head above <html> in WP pages

I've made a WordPress site. Before, I had a coded site in HTML. My new WordPress site is still in maintenance mode. But, I want to insert a PHP code above all the website content. This is my code: &...
-3
votes
2answers
143 views

Wordpress mobile and desktop header problems [closed]

the thing is that in mobile/tabler versions blank white space appears. In desktop version there is no such problem. Moreover, I noticed that if you drag something in mobile version from that blank ...
0
votes
1answer
1k views

Why are <link rel> tags from the header showing up on my Wordpress site? [closed]

I am testing my new WP site. I wanted to see how it worked using a text-only browser, so I fired up "links" from my shell to visit the site. At the top of the page before my navigation menu, the ...
0
votes
2answers
195 views

Insert Code into Header Only on Blog Posts

Is there a way to put some code into the header but have it load only on blog posts? Maybe a plugin or a piece of code that could help me accomplish this?
0
votes
1answer
1k views

Modify wp headers on specific page

I'm trying to change the cache-control header of a specific post (1234). I tried adding the following to the end of my functions.php: add_filter('wp_headers', 'wp_test_headers'); function ...
0
votes
0answers
3k views

Some data has already been output, can't send PDF file - fpdf issue in Wordpress

I encountered a problem with FPDF in wordpress. Actually, I am developing a wordpress plugin where need to generate pdf. As a php application its working fine. But when I converted it to wordpress ...
0
votes
1answer
303 views

Change header on pages displaying taxonomy items

I've added a custom taxonomy called "materia" in my single product page. For instance: https://www.editorialufv.es/catalogo/universitarios-socialmente-responsables/ When you click on one of the items ...
2
votes
1answer
10k views

Remove rel=shortlink from HTTP header

HTTP header of posts on my site looks like this: accept-ranges:bytes cache-control:public, max-age=0,public,public content-encoding:gzip content-length:5369 content-type:text/html; charset=UTF-8 date:...
0
votes
1answer
65 views

How to include different html tags in the header for different pages?

I am changing the banner in the header based on the page id: if(is_page(14) or is_page(16)) { $class_name='bannerExp'; } if(is_page(18) or is_page(52) or is_page(22) or is_page(20)) { $...
0
votes
1answer
697 views

Headers already sent on custom plugin (Export function)

I've developed a plugin and have an export function that exports data from wordpress to csv.. the issue is that the "Header" statement is causing the "Headers already sent error". I've checked ...
0
votes
1answer
265 views

Twenty Fourteen: Shrinking header while scrolling down

I am using the Twenty Fourteen theme. Normally the header has a heigth of 48 px. I made the logo bigger with the following code: .header-main { min-height: 108px; } That works well so far. Now ...
0
votes
1answer
104 views

Twenty Fourteen: Unsticky header after making header bigger

I am using theme Twenty Fourteen, and to add a logo I made the header bigger with the following code: .header-main { min-height: 108px; } It works, but now the header isn't sticky anymore and ...
1
vote
2answers
162 views

Want to make header and footer CMS driven sothat Editors can modify its content from wordpress admin section

First time I am working on WordPress CMS but have fair experience in other CMS products such as Umbraco, Tridion , sitecore etc. I am using ACF (advance custom field) to create the content forms in ...
0
votes
2answers
137 views

How to prevent a style sheet to affect a header.php or footer.php?

I crated a footer.php and a corresponding customFooter.php. It looked great until I added header.php and customHeader.css. Now the 2 custom css files are overlaping. For example: some of the <img&...
0
votes
2answers
3k views

How do I change top header background color

Please refer to website: https://virginiafrank.com I cannot get the top header background color (or phone numbers) to change color. I would prefer the background gold and text black. I can't make that ...
0
votes
2answers
1k views

How to register and set http/2 server prefetch for a specific asset?

I have been using, this plugin and its says WordPress 4.6 introduced native support for resource hints. By default, this plugin defers to WordPress 4.6 and theme/plugin developers to responsibly ...
0
votes
1answer
761 views

Return get_header and get_footer string instead of echo it

I am trying to use mustache within a wordpress application and modularize it. I would like to use mustache partials to inject the header and footer string into individual template files. However, as ...
0
votes
1answer
423 views

Print title page in header of a specific page

I'm trying to customize Avada template. I want to print in the header the page title, but only for specific pages. So I tried in header.php <head> <?php if ( page_is('80') ) { echo ...
0
votes
1answer
299 views

How to add an image below the header on homepage

Thanks in advance for the help. I just activated the Astra theme and have created a child for customization. I want an image between the header and content sections. Similar to the twentyseventeen ...
0
votes
2answers
891 views

navbar remove box shadow

https://peaceloveandbirth.com/ Underneath the 'Birth preparation for Mind, Body & Soul' line at the top I want to remove the grey divider line (you can especially see it when the navbar is ...
0
votes
2answers
24 views

Why is http header providing 404 while site is online?

I just transferred my wordpress website from http to https, added easyapache and http2 as well. Everything is fine and working as expected except for the fact that my homepage is giving response code ...
1
vote
1answer
2k views

Menu custom link not working for external site

I've got this header menu in my site (made editing a theme), but i've noticed that the custom links pointing at local anchor section (like #section) correctly navigate in the same page to the desired ...
1
vote
2answers
966 views

How to duplicate a page template but make minor changes to the header?

I will apologize in advance, I am very new to this. I have been teaching myself php as a hobby, but now I need it for work! I don't work as a web designer, but to try and save some money, I need to ...
1
vote
1answer
2k views

Remove link around logo

I have this in the functions.php: add_theme_support( 'custom-logo', array( 'height' => 200, 'width' => 1000, 'flex-width' => true, 'flex-height' =&...
2
votes
2answers
6k views

In a WordPress plugin, how do you output HTML code inside the DOM header? [closed]

HTML: <header> <!-- I want to add html code here --> </header> Function: function add_html_to_header { <b> Hello World </b> } add_action('','...
0
votes
0answers
581 views

only header is showing up in posts

Header section is showing up. Home page and other pages are fine. But for post. This error is coming It was working since morning. https://repairmymobile.in/flash/spreadtrum-upgrade-tool/ Thanks ...
0
votes
2answers
753 views

Facebook embeds loading the wrong language

The theme I am using has a function to embed videos from Facebook. The problem is that whenever I use it it loads the SDK in uk_UA for whatever reasons (Ukrainian). Nothing related to my Website or ...
0
votes
3answers
160 views

header background color changed after drop & import database in phpmyadmin

This is what I did in phpmyadmin. Export DB in .sql format Drop all tables Import the exported DB The database should be same, but the website looks weird as below... how come...? Before (black ...
0
votes
1answer
61 views

Getting Whitescreen when publishing a post [closed]

I'm working on my first theme from scratch. So far so good. Locally with XAMPP everything works fine. I uploaded my theme to my FTP Server. Now I get a Whitescreen after publishing/editing a post. I ...
0
votes
1answer
626 views

How to force download a plugin generated file?

I have a plugin that generates a CSV file with information from the blog. Now I want users to be able to download this file. For example when they visit http://example.org/download/information.csv, ...
0
votes
1answer
189 views

Use header option on wp-login page with a second logo

Is it possible to use the header image on top of the wp-login.php page, with placement as it would on any other page? Customization plugins only support 1 image as the logo, but not a header image. ...
2
votes
2answers
991 views

HTTP Security Headers in wp-config

Is there a way to place the HTTP Security Headers in wp-config.php instead of in .htaccess or functions.php? If so, what is the format?
0
votes
2answers
29 views

How do I show a button only on my custom template page?

<button name="button" style="margin: 20px 0 0 796px;padding: 3px 25px; background-color: red;color: white;font-weight: bold;" value="OK" type="button" >HAVE A QUESTIONS</button> i make ...
0
votes
1answer
11k views

My header not showing up [closed]

I'm starting a brand new theme and my header.php's content is not being output to the browser, the browser is just plainly ignoring it. Any ideas? EDIT: I just wasn't calling it by get_header(), ...
1
vote
1answer
1k views

Header: Include Date Published and Date Modified

I'm trying to put the Date Published and Date Modified into the meta tags of the head of the header.php page - so far no luck. This is what I currently have: <meta name="date" content="<?php ...
0
votes
2answers
1k views

How to override parent theme function through the child theme [closed]

Trying to create a template that places a custom post UI image between the navigation bar and the title like this: However, I am unable to override the header-extensions.php in my child folder to the ...
1
vote
1answer
876 views

StudioPress: add meta tag to every page [closed]

I need to add this meta tag to every page in my site. <meta http-equiv="X-UA-Compatible" content="IE=edge"> I found this PHP function on github add_action( 'wp_head', 'wsm_keep_ie_modern' ); ...
0
votes
2answers
87 views

My permalinks for all pages and posts now include old page titles as parents/categories

The permalink structure has changed with old entries as well as any new entry (post, object, etc) from THEN to NOW THEN: constructstudies.com/(page slug or object label) NOW: ...
0
votes
0answers
216 views

Changing headers for an export from within a PHP class extension

I'm trying to alter a plugin (WP Log Action) to allow for exporting of a table in the WP Admin area. Alas, instead of a CSV file I get the results printed to the screen and the classic old "WARNING: ...
4
votes
3answers
2k views

Override json encoding in rest api

I'm trying to create a secure download plugin. I found the rest api the best option for this task, but i cant change headers like Content-Type:. In the register_rest_route callback these headers ...
0
votes
1answer
201 views

How do I apply different headers to different pages using this template?

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="pagecontent-header"> <?php the_title( '<span class="entry-title">', '</span&...
4
votes
2answers
6k views

Custom endpoint and X-WP-TotalPages (headers)

I have a custom endpoint defined like so: add_action( 'rest_api_init', function () { register_rest_route( 'menc/v1', '/crosscat/(?P<dept>[\w-]+)/(?P<cat>[\w-]+)', array( ...
0
votes
0answers
437 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
88 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
489 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 ...

1 2 3
4
5
12