Wordpress - How to show header on every page? The 2019 Stack Overflow Developer Survey Results Are InHow do you disable browser Autocomplete on web form field / input tag?How can I prevent SQL injection in PHP?How to horizontally center a <div>?How to change an element's class with JavaScript?How do I modify the URL without reloading the page?How to check whether a checkbox is checked in jQuery?How to use HTML to print header and footer on every printed page of a document?How to disable resizable property of textarea?Redirect from an HTML pageHow to fix “Headers already sent” error in PHP

Does the shape of a die affect the probability of a number being rolled?

Can we generate random numbers using irrational numbers like π and e?

Time travel alters history but people keep saying nothing's changed

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Can you compress metal and what would be the consequences?

Falsification in Math vs Science

Why can Shazam fly?

A poker game description that does not feel gimmicky

Should I use my personal e-mail address, or my workplace one, when registering to external websites for work purposes?

How to save as into a customized destination on macOS?

Reference request: Oldest number theory books with (unsolved) exercises?

Output the Arecibo Message

Can someone be penalized for an "unlawful" act if no penalty is specified?

How are circuits which use complex ICs normally simulated?

Why isn't airport relocation done gradually?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

How technical should a Scrum Master be to effectively remove impediments?

What does ひと匙 mean in this manga and has it been used colloquially?

Delete all lines which don't have n characters before delimiter

Is an up-to-date browser secure on an out-of-date OS?

One word riddle: Vowel in the middle

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

If a Druid sees an animal’s corpse, can they Wild Shape into that animal?

Am I thawing this London Broil safely?



Wordpress - How to show header on every page?



The 2019 Stack Overflow Developer Survey Results Are InHow do you disable browser Autocomplete on web form field / input tag?How can I prevent SQL injection in PHP?How to horizontally center a <div>?How to change an element's class with JavaScript?How do I modify the URL without reloading the page?How to check whether a checkbox is checked in jQuery?How to use HTML to print header and footer on every printed page of a document?How to disable resizable property of textarea?Redirect from an HTML pageHow to fix “Headers already sent” error in PHP



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm working on a Wordpress site and I have a header image on the homepage. It's only showing up on the homepage but I need it to show on every page. I found this code in the header.php file which I believe needs to be changed, but I'm not very familiar with php.



This is the code for the header image in the header.php file:



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>

<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


Thank you!



Edit: This is how it shows on all pages but the home page. But I would like it to show the full header instead of only a section of it with the page title.



Header



This is the home page, where it shows the full header and how I'd like it to show on every page instead of how it does in the image above.
Home Header










share|improve this question
























  • can you let me know which theme you are using.

    – Pullata Praveen
    Mar 22 at 3:49












  • I'm using the "Minimal Portfolio" theme.

    – Kyra Lane
    Mar 22 at 3:50











  • did you tried adding the featured image to the pages

    – Pullata Praveen
    Mar 22 at 3:57











  • Yes I did. Also I should add that instead of displaying a full header, on every other page it only shows a small area of the header, with a black overlay and title over it. If that makes sense?

    – Kyra Lane
    Mar 22 at 3:59











  • I uploaded some images to better explain what I mean in my original post.

    – Kyra Lane
    Mar 22 at 4:07

















0















I'm working on a Wordpress site and I have a header image on the homepage. It's only showing up on the homepage but I need it to show on every page. I found this code in the header.php file which I believe needs to be changed, but I'm not very familiar with php.



This is the code for the header image in the header.php file:



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>

<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


Thank you!



Edit: This is how it shows on all pages but the home page. But I would like it to show the full header instead of only a section of it with the page title.



Header



This is the home page, where it shows the full header and how I'd like it to show on every page instead of how it does in the image above.
Home Header










share|improve this question
























  • can you let me know which theme you are using.

    – Pullata Praveen
    Mar 22 at 3:49












  • I'm using the "Minimal Portfolio" theme.

    – Kyra Lane
    Mar 22 at 3:50











  • did you tried adding the featured image to the pages

    – Pullata Praveen
    Mar 22 at 3:57











  • Yes I did. Also I should add that instead of displaying a full header, on every other page it only shows a small area of the header, with a black overlay and title over it. If that makes sense?

    – Kyra Lane
    Mar 22 at 3:59











  • I uploaded some images to better explain what I mean in my original post.

    – Kyra Lane
    Mar 22 at 4:07













0












0








0








I'm working on a Wordpress site and I have a header image on the homepage. It's only showing up on the homepage but I need it to show on every page. I found this code in the header.php file which I believe needs to be changed, but I'm not very familiar with php.



This is the code for the header image in the header.php file:



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>

<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


Thank you!



Edit: This is how it shows on all pages but the home page. But I would like it to show the full header instead of only a section of it with the page title.



Header



This is the home page, where it shows the full header and how I'd like it to show on every page instead of how it does in the image above.
Home Header










share|improve this question
















I'm working on a Wordpress site and I have a header image on the homepage. It's only showing up on the homepage but I need it to show on every page. I found this code in the header.php file which I believe needs to be changed, but I'm not very familiar with php.



This is the code for the header image in the header.php file:



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>

<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


Thank you!



Edit: This is how it shows on all pages but the home page. But I would like it to show the full header instead of only a section of it with the page title.



Header



This is the home page, where it shows the full header and how I'd like it to show on every page instead of how it does in the image above.
Home Header







php html wordpress header






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 4:30







Kyra Lane

















asked Mar 22 at 3:45









Kyra LaneKyra Lane

11




11












  • can you let me know which theme you are using.

    – Pullata Praveen
    Mar 22 at 3:49












  • I'm using the "Minimal Portfolio" theme.

    – Kyra Lane
    Mar 22 at 3:50











  • did you tried adding the featured image to the pages

    – Pullata Praveen
    Mar 22 at 3:57











  • Yes I did. Also I should add that instead of displaying a full header, on every other page it only shows a small area of the header, with a black overlay and title over it. If that makes sense?

    – Kyra Lane
    Mar 22 at 3:59











  • I uploaded some images to better explain what I mean in my original post.

    – Kyra Lane
    Mar 22 at 4:07

















  • can you let me know which theme you are using.

    – Pullata Praveen
    Mar 22 at 3:49












  • I'm using the "Minimal Portfolio" theme.

    – Kyra Lane
    Mar 22 at 3:50











  • did you tried adding the featured image to the pages

    – Pullata Praveen
    Mar 22 at 3:57











  • Yes I did. Also I should add that instead of displaying a full header, on every other page it only shows a small area of the header, with a black overlay and title over it. If that makes sense?

    – Kyra Lane
    Mar 22 at 3:59











  • I uploaded some images to better explain what I mean in my original post.

    – Kyra Lane
    Mar 22 at 4:07
















can you let me know which theme you are using.

– Pullata Praveen
Mar 22 at 3:49






can you let me know which theme you are using.

– Pullata Praveen
Mar 22 at 3:49














I'm using the "Minimal Portfolio" theme.

– Kyra Lane
Mar 22 at 3:50





I'm using the "Minimal Portfolio" theme.

– Kyra Lane
Mar 22 at 3:50













did you tried adding the featured image to the pages

– Pullata Praveen
Mar 22 at 3:57





did you tried adding the featured image to the pages

– Pullata Praveen
Mar 22 at 3:57













Yes I did. Also I should add that instead of displaying a full header, on every other page it only shows a small area of the header, with a black overlay and title over it. If that makes sense?

– Kyra Lane
Mar 22 at 3:59





Yes I did. Also I should add that instead of displaying a full header, on every other page it only shows a small area of the header, with a black overlay and title over it. If that makes sense?

– Kyra Lane
Mar 22 at 3:59













I uploaded some images to better explain what I mean in my original post.

– Kyra Lane
Mar 22 at 4:07





I uploaded some images to better explain what I mean in my original post.

– Kyra Lane
Mar 22 at 4:07












2 Answers
2






active

oldest

votes


















0














You are not familiar with PHP so you can use this plugin for the header image.
https://wordpress.org/plugins/unique-headers/



I think its work for you






share|improve this answer























  • I tried this as well and it didn't override the current theme's headers and didn't add anything unfortunately. Thank you for your help though.

    – Kyra Lane
    Mar 22 at 13:59


















0














Remove the below-attached code from header.php



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


And add this code in your page.php



<?php if( get_header_image() ) : ?>
<div class="header-banner">
<img src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</div>







share|improve this answer























  • When removing the code in the header.php I get this error: Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home1/kyra/public_html/wp-content/themes/minimal-portfolio/page.php on line 47

    – Kyra Lane
    Mar 22 at 13:50











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292596%2fwordpress-how-to-show-header-on-every-page%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You are not familiar with PHP so you can use this plugin for the header image.
https://wordpress.org/plugins/unique-headers/



I think its work for you






share|improve this answer























  • I tried this as well and it didn't override the current theme's headers and didn't add anything unfortunately. Thank you for your help though.

    – Kyra Lane
    Mar 22 at 13:59















0














You are not familiar with PHP so you can use this plugin for the header image.
https://wordpress.org/plugins/unique-headers/



I think its work for you






share|improve this answer























  • I tried this as well and it didn't override the current theme's headers and didn't add anything unfortunately. Thank you for your help though.

    – Kyra Lane
    Mar 22 at 13:59













0












0








0







You are not familiar with PHP so you can use this plugin for the header image.
https://wordpress.org/plugins/unique-headers/



I think its work for you






share|improve this answer













You are not familiar with PHP so you can use this plugin for the header image.
https://wordpress.org/plugins/unique-headers/



I think its work for you







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 22 at 4:32









Harsh KhareHarsh Khare

48710




48710












  • I tried this as well and it didn't override the current theme's headers and didn't add anything unfortunately. Thank you for your help though.

    – Kyra Lane
    Mar 22 at 13:59

















  • I tried this as well and it didn't override the current theme's headers and didn't add anything unfortunately. Thank you for your help though.

    – Kyra Lane
    Mar 22 at 13:59
















I tried this as well and it didn't override the current theme's headers and didn't add anything unfortunately. Thank you for your help though.

– Kyra Lane
Mar 22 at 13:59





I tried this as well and it didn't override the current theme's headers and didn't add anything unfortunately. Thank you for your help though.

– Kyra Lane
Mar 22 at 13:59













0














Remove the below-attached code from header.php



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


And add this code in your page.php



<?php if( get_header_image() ) : ?>
<div class="header-banner">
<img src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</div>







share|improve this answer























  • When removing the code in the header.php I get this error: Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home1/kyra/public_html/wp-content/themes/minimal-portfolio/page.php on line 47

    – Kyra Lane
    Mar 22 at 13:50















0














Remove the below-attached code from header.php



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


And add this code in your page.php



<?php if( get_header_image() ) : ?>
<div class="header-banner">
<img src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</div>







share|improve this answer























  • When removing the code in the header.php I get this error: Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home1/kyra/public_html/wp-content/themes/minimal-portfolio/page.php on line 47

    – Kyra Lane
    Mar 22 at 13:50













0












0








0







Remove the below-attached code from header.php



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


And add this code in your page.php



<?php if( get_header_image() ) : ?>
<div class="header-banner">
<img src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</div>







share|improve this answer













Remove the below-attached code from header.php



<?php $disable_page_title = get_post_meta( get_the_ID(), 'minimal_portfolio_page_title', true ); 
if( $disable_page_title !== 'on' ): ?>
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron <?php if ( get_header_image() ) : ?>bg-image<?php endif; ?>" <?php if ( get_header_image() ) : ?> style="background-image:url('<?php echo esc_url( get_header_image() ); ?>');" <?php endif; ?>>
<?php if ( get_header_image() ) : ?><span class="bg-overlay"></span><?php endif; ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title-wrap">
<?php if( is_page() || is_single() ) ?>
<h2 class="page-title"><?php echo esc_html( get_the_title() ); ?></h2>

<?php elseif( is_search() ) ?>
<?php /* translators: %s: search term */
$page_title = sprintf( esc_html__( 'Search Results for: %s', 'minimal-portfolio' ), get_search_query() );
?>
<h2 class="page-title"><?php echo esc_html( $page_title ); ?></h2>

<?php elseif( is_404() ) ?>

<h2 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'minimal-portfolio' ); ?></h2>

<?php elseif( is_home() ) ?>

<h2 class="page-title"><?php single_post_title(); ?></h2>

<?php else

the_archive_title( '<h2 class="page-title">', '</h2>' );


if( $minimal_portfolio_breadcrumb_status ):
minimal_portfolio_breadcrumbs();
endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php endif;
endif; ?>


And add this code in your page.php



<?php if( get_header_image() ) : ?>
<div class="header-banner">
<img src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</div>








share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 22 at 4:52









Pullata PraveenPullata Praveen

397212




397212












  • When removing the code in the header.php I get this error: Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home1/kyra/public_html/wp-content/themes/minimal-portfolio/page.php on line 47

    – Kyra Lane
    Mar 22 at 13:50

















  • When removing the code in the header.php I get this error: Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home1/kyra/public_html/wp-content/themes/minimal-portfolio/page.php on line 47

    – Kyra Lane
    Mar 22 at 13:50
















When removing the code in the header.php I get this error: Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home1/kyra/public_html/wp-content/themes/minimal-portfolio/page.php on line 47

– Kyra Lane
Mar 22 at 13:50





When removing the code in the header.php I get this error: Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home1/kyra/public_html/wp-content/themes/minimal-portfolio/page.php on line 47

– Kyra Lane
Mar 22 at 13:50

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292596%2fwordpress-how-to-show-header-on-every-page%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript