13 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Indonesia
themelines says

I made a wordpress theme, I have some header files. I would like to appear on the Appearance > Menus such as:

- Header
-- Header 1
-- Header 2
-- Header 3

with Header 1, 2 and 3 call header1.php, header2.php, header3.php file. how can I do that?

Thanks :)

1612 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Contributed a free file of the month
+9 more
DaniMun says

Maybe this might help. Also, check this one as well.

121 posts
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
+1 more
Rameau says

I made a wordpress theme, I have some header files. I would like to appear on the Appearance > Menus such as:
- Header
-- Header 1
-- Header 2
-- Header 3

with Header 1, 2 and 3 call header1.php, header2.php, header3.php file. how can I do that?

Thanks :)

That shouldn’t be in the menus, or should it? What I think you need are custom page templates.

13 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Indonesia
themelines says

Maybe this might help. Also, check this one as well.

Hi, DaniMun thenks for reply.

I’ve read about it. But what I want is all the pages have the same header in accordance with the chosen.

For example can be seen on this Item. Take a look at the menu header. they have some kind of header.

13 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Indonesia
themelines says


I made a wordpress theme, I have some header files. I would like to appear on the Appearance > Menus such as:
- Header
-- Header 1
-- Header 2
-- Header 3

with Header 1, 2 and 3 call header1.php, header2.php, header3.php file. how can I do that?

Thanks :)
That shouldn’t be in the menus, or should it? What I think you need are custom page templates.

I think it seems that the menu. Because I’ve seen some themes aren’t made ??with the page template. Or maybe I’m wrong? :)

I just made ??a custom template for homapage, blog. And have not tried to header template. I think the menu and call a different header file :)

121 posts
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
+1 more
Rameau says

The thing is, create the custom page templates for each header, create pages using these custom page templates, then add these pages in your menu. Example:
Create files like header-1.php, header-2.php
Create custom page templates and for example, for the first header, when doing the <?php get_header(); ?>, do <?php get_header(‘1’); ?>. Replace ‘1’ with whatever you added after the “header-” when naming the files.

13 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Indonesia
themelines says

Means, must be by way of a custom template? Okay. I will try the way you said. If I have a problem again I will ask

Thanks for Reply Rameau :)

1290 posts How's the surf doing?
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
tommusrhodus says

Really simple, use an theme options framework, I recommend using the build in theme options API;

https://codex.wordpress.org/Theme_Customization_API

Make yourself a drop down option with your header names and then echo this option into your theme something like this, depending on how you’ve set-up your options;

<?php get_header($option['header_style']); ?>

EDIT: Using this method instead of page templates means you can define site wide header styles, if you want to :)

13 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Indonesia
themelines says

Really simple, use an theme options framework, I recommend using the build in theme options API; https://codex.wordpress.org/Theme_Customization_API

Make yourself a drop down option with your header names and then echo this option into your theme something like this, depending on how you’ve set-up your options;

<?php get_header($option['header_style']); ?>
EDIT: Using this method instead of page templates means you can define site wide header styles, if you want to :)

Thanks TommusRhodus for reply. I will try it. :)

13 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Indonesia
themelines says
EDIT: Using this method instead of page templates means you can define site wide header styles, if you want to :)

Yeah right. I want to make a header like this item. So who changed the header only and does not change the content on the page.

by
by
by
by
by
by