which page should have the alternative header?
what is the file name of the alternative header file?
what call are you using to get this alternative header in page.php?
https://developer.wordpress.org/reference/functions/get_header/
Thank you for replying.
which page should have the alternative header?
https://empoweringcolorado.org/big-pivots/
what is the file name of the alternative header file?
header-big-pivots.php (which includes all of the code in the main header.php file.
what call are you using to get this alternative header in page.php?
<?php if(is_page(‘big-pivots’)) { get_header(‘big-pivots’); } else { get_header(); } wp_head(); ?–>
the code looks ok;
unfortunately, the page ‘big-pivots’ does not show;
error:
This page isn’t working
empoweringcolorado.org is currently unable to handle this request.
HTTP ERROR 500
I’ve run in to a real mess in the course of trying to fix this problem. I’ve undoubtedly made a bad problem worse by trying to edit some of the .php files associated with my theme. I’ve tried to return things back to normal but so far stuff isn’t displaying correctly. It seems if you access a page from my site (as opposed to going to a page directly via link) it displays. But if I’m logged in as an administrator or I access a page directly I’m having problems. I’ve only edited page.php and added a new header.php file. I’m not sure what I could have screwed up. I downloaded the plugin Query Monitor and receive this message when I try to view a page as an administrator:
===========
Fatal error: Uncaught Error: syntax error, unexpected ‘locate_template’ (T_STRING)
in /home/viewwebinfo/public_html/empoweringcoorg/wp-content/themes/Largo-master/page.php on line 1
Call stack:
require_once()
wp-blog-header.php:19
require()
index.php:17
===================
Here’s a copy of my page.php file:
======
<?php
/**
* The Template for displaying all pages.
*/
locate_template( ‘single.php’, true );
==============
I appreciate any help you’re willing to offer.
Problem has been resolved. Fixed page.php file and pages now display properly. But I’m back where I started — trying to build a page with a different header. Thanks for your help.