Solved

Question: Confusion with home.php and Navigation Menus

Posted on 2011-03-19
7
288 Views
Last Modified: 2012-05-11
Ok,

1. I'm working through a tutorial on Creating Custom Themes in WordPress (Translation: I'm green! Please take that into consideration).
2. I've added a home.php page which should override my index.php file (right?).
3. When I go to the rootsite (www.site.com), I SEE home.php

The problem....

4. My theme also has a Nav which I've created in the WP Admin section and which I've registered in functions.php.
5. In order to HAVE a "homepage" (in the Nav), I had to add a NEW page to WordPress. So... now I have TWO home pages: home.php (which I've styled up and laid out) AND homepage which I generated in WP Admin.  
6. When I created the nav, home.php was not available but the homepage I created in the admin IS listed.That's (apparently) all i can use.
7. So, my nav now points to a different homepage then the one I created (and want to show).
8. When I click the home link (from my nav), it shows posts (apparantly pulled from the generic "page.php"), NOT my fancy laid out page (as in "home.php")

...so...

Questions:

1. How can i get the link in the left nav (built in WP Admin) to show the same page as home.php
2. Or, do I need to (in someway) duplicate home.php and show it on the homepage I created to use the WP Admin Nav Tools?

please advise.
0
Comment
Question by:the_sleeper
  • 3
  • 2
  • 2
7 Comments
 

Author Comment

by:the_sleeper
ID: 35173421
Update: I created a custom link in the nav which pointed to the main page of the site. That works, but I'm not sure if that is the proper WordPress way to do it. As I said iIm pretty green on WordPress.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 35173453
I don't see why that would be a problem. That's what I would have done. Good work.

If you plan on allowing others to use the theme it could be a little confusing to the person using it. If you plan on selling, or offering it for free you may reconsider the setup.

Did your custom page require a different header set-up? If not just use the get header command in the custom page template..
0
 
LVL 2

Expert Comment

by:SonicVoom
ID: 35173484
There's a better way of creating the Home item in the navigation menu.

If you've created your theme to support it,  Appearance-> Menu will create your menus simply. The link below describes directly adding your home page (whatever it is) to the menu by clicking on "View All" under "Pages" and adding the home item to your custom menu.

http://codex.wordpress.org/Appearance_Menus_SubPanel#Pages


If you don't want to use custom menus, you can also create your Home link using the wp_page_menu() function's parameter "show_home"

http://codex.wordpress.org/Function_Reference/wp_page_menu
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 23

Expert Comment

by:jeremyjared74
ID: 35173494
I think the custom menu is what is currently being used.
0
 

Author Comment

by:the_sleeper
ID: 35173796
Perhaps I should explain the fix more clearly

1. I went to the custom menu section in the admin
2. I created a link to www.site.com AS a custom menu item with a title of Home.
3. I then added that Custom Link to the Main Menu and positioned it.

hope this explains my "fix".

Is there a better (i.e. standard) way to fix?

please advise.
0
 
LVL 2

Accepted Solution

by:
SonicVoom earned 500 total points
ID: 35173830
First, remove your custom link. We can point specifically to whatever loads as home/site root.

Custom Menu > Pages box:
"Links to specific pages can be added to the menu. Three tabs, Most Recent, View All, and Search, determines what posts are displayed for selection as a menu item. When the View All tab is displayed, a Home choice, while not an actual page, also becomes available to add to the menu. The Checkbox, Select All, and Add to Menu options, describe in the Posts section, are also displayed in this module. "

(from http://codex.wordpress.org/Appearance_Menus_SubPanel#Pages )
0
 

Author Comment

by:the_sleeper
ID: 35173897
Ok, I get it! Thanks everyone.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Encode a password 2 63
Woocommerce Global Add Ons 6 15
CSS z-index issue 3 32
SlickNav Menu Plugin Not appearing on mobile 6 34
Did you use a default hosting installation of wordpress with the intention of it being your actual site?  Maybe you’ve installed it as a Blog to your current site and recently converted it to be the main site and do away with the old .htm pages.  An…
What's this? As a volunteer Page Editor for Experts-Exchange.com, I have noticed that many authors also have blogs, and pull articles from their blogs to post at Experts-Exchange. I appreciate each author sharing their blog content with our site …
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question