loop – Custom Header added within Dashboard pages, is this possible with custom template files?

Question

I created a custom template and called it Header Home”header-home.php”

<?php
/**
* Template Name: Header Home
*/
?>
<?php
  if( have_post() ) {
    while( have_post() ){
      the_post();
    }
  }
?>

Then on my front page i call it with

<?php get_header( 'home' ); ?>

Now, when i create a page, and use template “Header Home” and add my html content inside, it’s not showing on the front page at all. Shouldn’t the loop grab those html and add it on the header-home.php then be shown when get_header( ‘home’ ) is called?

When i add the html code directly in the header-home.php, it is working, but is there a way to add it within the dashboard page so it’s easily “codeable”

0
Daryl Jake Cantojos 4 months 2022-05-01T01:01:19-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse