Solved

Question: Confusion with home.php and Navigation Menus

Posted on 2011-03-19
7
296 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Effect of setting a page visibility to Private 3 35
if (is_singular not working 5 37
Wordpress Contact Form 7 using up whole page 3 26
Wordpress Pricing 3 28
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 …
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 properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to Import and export files in 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 : Click on Too…

713 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