Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   How to create a static home page? (http://forum.bytesforall.com/showthread.php?t=1339)

tomlucas Apr 20, 2009 10:55 AM

How to create a static home page?
 
When I initially created this blog, it was with another theme and after finding this wonderful theme have converted it. And, the "Home Page" had all the postings.

Now, I have created a static page that I wish to be my "Home Page."

For the time being, I have created a "work around." However, when anyone goes to my URL,
http://samtom.net/blog they go straight to the default home page that's currently labeled "Postings" rather than to the static page I've designated as "Home."

Also, this static page is titled "Home" which puts the link in link area, but also places a bolded "Home"
at the beginning of the static page. How do I eliminate the bolded "Home" in the body of the static page? :confused:

How do I get all in the proper slots so everything works like it should including the proper order of the links above the header?

Many thanks,

Tom

Flynn Apr 20, 2009 08:18 PM

Regarding links in the menu see Theme Options -> Page Menu Bar

To set a static page as the home page see Site Admin -> Settings -> Reading

To remove the page heading from the page body on the homepage add this to HTML/CSS Inserts -> CSS Insert

HTML Code:

body#body-frontpage div.post-title {
display: none;
}

This might cause problems with Google as you're effectively "hiding" text. Alternatively try this to move the heading off the screen instead:

HTML Code:

body#body-frontpage div.post-title {
margin-left: -999em;
}

The Google-safe version would be to manually edit index.php and replace this
PHP Code:

        <!-- Post Headline -->                    
        <div class="post-headline">    
        <h2><?php 
        
if( !is_single() AND !is_page() ) { ?>
            <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php 
            
if (function_exists('the_title_attribute')) { 
                
the_title_attribute();
            } 
            elseif (
function_exists('the_title')) { 
                
the_title();
            } 
?>"><?php 
        
the_title(); 
        if( !
is_single() AND !is_page() ) { ?>
            </a><?php 
        
?>
        </h2>
        </div>

with this

PHP Code:

<?php if ( !is_front_page() ) { ?>
        <!-- Post Headline -->                    
        <div class="post-headline">    
        <h2><?php 
        
if( !is_single() AND !is_page() ) { ?>
            <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php 
            
if (function_exists('the_title_attribute')) { 
                
the_title_attribute();
            } 
            elseif (
function_exists('the_title')) { 
                
the_title();
            } 
?>"><?php 
        
the_title(); 
        if( !
is_single() AND !is_page() ) { ?>
            </a><?php 
        
?>
        </h2>
        </div>
<?php ?>


clevis Apr 21, 2009 01:47 AM

Thanks for the post Quinn - very helpful!

I think there's a minor typo in the PHP, to whit:

"<?php if ( !is_frontpage() ) { ?>"

should be

"<?php if ( !is_front_page() ) { ?>"

Cheers!


All times are GMT -6. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.