Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Question: Confusion with home.php and Navigation Menus

Posted on 2011-03-19
7
Medium Priority
?
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Now that you've installed WordPress 2.9 (http://www.experts-exchange.com/articles/Web_Development/Blogs/WordPress/WordPress-2-9-What-to-Expect-When-Upgrading-to-WordPress-2-9.html?) on your site, you need to install some plugins to get the most out …
How to create your own WordPress Theme Before I begin with the theme design tutorial, I would like to give you the basics of what is required to make a WordPress Theme. The most basic WordPress theme only requires 2 files: a style.css file and an…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
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…

721 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