defaults to a page rather than to her blog,
Check if the theme to that original site has a home.php OR if in its Admin > Settings > Reading, “Front Page Displays” > A Static Page with a specific page for the home page. To get it back to blog form, just reset the Reading Panel to “Front Page Displays” > Your latest posts.
I added a home.php template to the theme. I have created a “home” page in the pages section, but the two do not link together.
They won’t link together. You should check out codex re Template Hierarchy wherein:
If a visitor goes to your home page at http://example.com/, WordPress first determines whether it has a static front page. If a static front page has been set, then WordPress loads that page according to the page template hierarchy. If a static front page has not been set, then WordPress looks for a template file called home.php and uses it to generate the requested page. If home.php is missing, WordPress looks for a file called index.php in the active theme's directory, and uses that template to generate the page.
Therefore if you want to create a special template page for a home page using Pages, do not name it home.php. If you want to set up and upload home.php, do not create a static front page named Home. Use one or the other method.
Thread Starter
digne
(@digne)
Well that stinks!
So I’ll probably have to leave everything in the home.php file. Which will make it harder for my friend to edit herself.
If I knew the file path to the pages files, could I do an include or require in php? Probably not, WordPress would probably try to create duplicate pages one using home.php and another using index.php.
So now I need to find out how to edit the php in the sidebar to including a link back to the “home” page now that it will no longer be in the “pages” section WordPress won’t automatically generate one.
Can any one help me there?
What I posted above was that you have to use one or the other method. So you have option of either
1) a home.php which will automatically be the home page OR
2) us a Page set as Home page in Setting > Reading > Front Page is …
And that Page can either be:
a. a regular Page or theme’s page.php OR
b. Page template created (you can call from Page > Add New > Attributes box) named page-home.php
Thread Starter
digne
(@digne)
I understand that. But I’m going to need a link back to my home page now that WordPress won’t automatically create one. My PHP reads as follows:
<ul>
<?php
// for sidebar widgets
if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( ) )
{
// search bar
sp_sidebar_open( "searchbar", "<h2>Search</h2>" );
include (TEMPLATEPATH . '/searchform.php');
sp_sidebar_close( );
// pages
sp_sidebar_open( "pages", "<h2>Pages</h2>" );
echo '<ul>';
wp_list_pages("title_li=&sort_column=menu_order&class=");
echo '</ul>';
sp_sidebar_close( );
} // sidebar widgets
?>
</ul>
I’ve tried the following code to add a real home link in but it just causes all the image links of the page to flicker when the mouse is over them and doesn’t add the link I want.
<ul>
<?php
// for sidebar widgets
if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( ) )
{
// search bar
sp_sidebar_open( "searchbar", "<h2>Search</h2>" );
include (TEMPLATEPATH . '/searchform.php');
sp_sidebar_close( );
// pages
sp_sidebar_open( "pages", "<h2>Pages</h2> <ul><a href=\"http://www.elizabethhanbury.com\">Home</a></ul>\n" );
echo '<ul>';
wp_list_pages("title_li=&sort_column=menu_order&class=");
echo '</ul>';
sp_sidebar_close( );
} // sidebar widgets
?>
</ul>
See:
http://sheynawatkins.com/wordpress/