13 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
  • 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 2 years
  • 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 2 years
  • 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 2 years
  • 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 :)

1585 posts How's the surf doing?
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Had an item featured on Envato Market
  • Made it to the Authors' Hall of Fame
+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 2 years
  • 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 2 years
  • 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by