Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   What if I want no title on a Page? (http://forum.bytesforall.com/showthread.php?t=19)

bseppa Dec 12, 2008 04:02 PM

What if I want no title on a Page?
 
Should I create a Page Template as I did in Atahualpa 2 or am I missing something? Will my Atahualpa 2 page template work in Atahualpa 3?

Thanks!

Flynn Dec 12, 2008 04:20 PM

Atahualpa 2 templates wouldn't work

You'd have to either create pagename.php or page.php, or change in index.php line 202


PHP Code:

elseif (function_exists('the_title')) {the_title();} ?> 

to (XXX = ID of that page)

PHP Code:

elseif (function_exists('the_title') AND $current_page_id != 'XXX') {the_title();} ?> 

I have not tested this

bseppa Dec 12, 2008 07:32 PM

Line 202 looks like this now:

PHP Code:

elseif (function_exists('the_title') AND $current_page_id != '3') {the_title();} ?>"><?php the_title(); if( !is_single() AND !is_page() ) { ?></a><?php ?></h2>

No dice. '3' is the unique ID of my Home Page but "Home" still shows up above the content.

I like this approach because I only ever have to do this for one page. Thoughts?

Flynn Dec 13, 2008 01:19 PM

Sorry I gave you a wrong code

Wrap the whole section from line 198-203 in index.php

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>

into

PHP Code:

<?php if($current_page_id != '3') { ?>
... line 198-203 ...
<?php ?>




bseppa Dec 13, 2008 01:25 PM

That was it... thanks!

Flynn Dec 13, 2008 01:26 PM

So you've set a static page as your homepage? In that case

PHP Code:

<?php if ( !is_front_page() ) { ?>
... line 198-203 ...
<?php ?>

should work, too, with the added flexibility that it would work even after you chose another page as the homepage

To others who want to do the same: is_front_page was added in Wordpress 2.5

bseppa Dec 13, 2008 01:28 PM

Just changed to

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

Worked great and you are right about my use of the static page feature.

I am loving this theme!


All times are GMT -6. The time now is 04:25 AM.

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