Quote:
Originally Posted by Eric Bobrow
I'd like to leave out the text for the Headline for the Home Page (i.e. I don't want it to say "Home") but I want to keep the Headline area (the yellow stripe) so that it is consistent with the other pages. See the graphic below.
Is there any way to do this?
|
Use this as the replacement code
PHP Code:
<div class="post-headline">
<?php if (!is_front_page()) { ?>
<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>
<?php } ?>
</div>
Note how the PHP "if..." condition does not enclose the <div class="post-headline"> ... </div> anymore. You can do the corresponding change to the other code samples (No page title on several page ID's, etc..)
Also, change Post/Page Styling -> HEADLINE Box: Text from
HTML Code:
margin-top: 10px;
to
HTML Code:
padding-top: 10px;
to correct the Firefox issue as seen in the attachment below
Quote:
Originally Posted by Eric Bobrow
One final related question: is there a way to have a different Title in the Headline than in the Page Menu?
|
Add a "custom field" at Pages -> Edit -> [below the edit screen] Custom Fields -> Add Custom Field, with
Name: long-title
Value: Long Page Title here...
Do this for every "Page" page.
In index.php, around line 97-99, change
PHP Code:
} ?>"><?php
} the_title();
if( !is_single() AND !is_page() ) { ?>
to
PHP Code:
} ?>"><?php
} if (is_page()) { echo get_post_meta($post->ID, 'long-title', TRUE); } else { the_title(); }
if( !is_single() AND !is_page() ) { ?>
I have not tested this.