Support » Themes and Templates » remove redundant page title in Thematic
remove redundant page title in Thematic
-
Intend to use WP as cms. How do I remove the page title from the content section of the pages? I want the titles to remain in the nav bar tabs, just not in the text area. I have searched the forums and codex, but the solution still eludes me. The code it says to change “the_title” doesn’t seem to appear in Thematic for the documents suggested to edit. Alas, I’m a total newbie to this. (And my eyesight isn’t so sharp either.) Thanks.
-
I have the same problem and would appreciate any help. Thanks!
the title is done by a function, of which you can find the code in /thematic/extensions/content-extensions.php, somewhere in the middle:
// Information in Post Header function thematic_postheader() { global $id, $post, $authordata; // @sonofido: // // put the next line in if you don't want a title on page // if(is_page()) { return; } //that should leave any content on a page without title // // untested // // Create $posteditlink $posteditlink .= '<a href="' . get_bloginfo('wpurl') . '/wp-admin/post.php?action=edit&post=' . $id; $posteditlink .= '" title="' . __('Edit post', 'thematic') .'">'; $posteditlink .= __('Edit', 'thematic') . '</a>'; $posteditlink = apply_filters('thematic_postheader_posteditlink',$posteditlink); if (is_single() || is_page()) { $posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n"; } elseif (is_404()) { $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n"; } else { $posttitle = '<h2 class="entry-title"><a href="'; $posttitle .= get_permalink(); $posttitle .= '" title="'; $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0'); $posttitle .= '" rel="bookmark">'; $posttitle .= get_the_title(); $posttitle .= "</a></h2>\n"; } $posttitle = apply_filters('thematic_postheader_posttitle',$posttitle); $postmeta = '<div class="entry-meta">'; $postmeta .= '<span class="meta-prep meta-prep-author">' . __('By ', 'thematic') . '</span>'; $postmeta .= '<span class="author vcard">'. '<a class="url fn n" href="'; $postmeta .= get_author_link(false, $authordata->ID, $authordata->user_nicename); $postmeta .= '" title="' . __('View all posts by ', 'thematic') . get_the_author() . '">'; $postmeta .= get_the_author(); $postmeta .= '</a></span><span class="meta-sep meta-sep-entry-date"> | </span>'; $postmeta .= '<span class="meta-prep meta-prep-entry-date">' . __('Published: ', 'thematic') . '</span>'; $postmeta .= '<span class="entry-date"><abbr class="published" title="'; $postmeta .= get_the_time(thematic_time_title()) . '">'; $postmeta .= get_the_time(thematic_time_display()); $postmeta .= '</abbr></span>'; // Display edit link if (current_user_can('edit_posts')) { $postmeta .= ' <span class="meta-sep meta-sep-edit">|</span> ' . '<span class="edit">' . $posteditlink . '</span>'; } $postmeta .= "</div><!-- .entry-meta -->\n"; $postmeta = apply_filters('thematic_postheader_postmeta',$postmeta); if ($post->post_type == 'page' || is_404()) { $postheader = $posttitle; } else { $postheader = $posttitle . $postmeta; } echo apply_filters( 'thematic_postheader', $postheader ); // Filter to override default post header } // end thematic_postheader
Thanks so much! I’ll try this out and let you know how it goes.
This worked perfectly!!
Only difference was that the file you mention is in this directory – thematic/library/extensions/content-extensionsThank you very much. FYI, the site I’m working on is at http://pradipmalde.com/blog
It is still in development but expect it to be ready on Dec. 1, 2009, at pradipmalde.comI think the proper way would be to take the page.php file and put it in your theme directory. Then just comment out thematic_postheader() and thematic will automatically look in your theme directory for page.php before it uses its own. The reason I say proper is if you do it the way I described, you can upgrade thematic without losing your changes.
If I were to remove the following section of code, would I end up with
By admin
only?
| Published: Date
would disappear, correct?
$postmeta .= ‘</span><span class=”meta-sep meta-sep-entry-date”> | </span>’;
$postmeta .= ‘<span class=”meta-prep meta-prep-entry-date”>’ . __(‘Published: ‘, ‘thematic’) . ‘</span>’;
$postmeta .= ‘<span class=”entry-date”><abbr class=”published” title=”‘;
$postmeta .= get_the_time(thematic_time_title()) . ‘”>’;
$postmeta .= get_the_time(thematic_time_display());
$postmeta .= ‘</abbr></span>’;I figured it out! I was able to remove everything by using this in the style.css:
.entry-meta .meta-prep-author, .entry-meta .author, .entry-meta .meta-sep-entry-date, .entry-meta .meta-prep-entry-date, .entry-meta .entry-date{display:none;}
Now, if I want to put By Author back in, I assume I’ll have to take out
.entry-meta .meta-prep-author, .entry-meta .author
Hi,
But the thematic_postheader_posttitle is meant to provide tweaking of the post title.
I have not tried this code. But it should work if you add it to your functions.php in the child theme.
function remove_postheader_posttitle($title){
return ('');
}
add_filter('thematic_postheader_posttitle','remove_postheader_posttitle');
– Rahul
Try this is you want to remove the title from a static front page and leave it on other pages. This also resolves the duplicate h1 tags.
function remove_postheader_posttitle($title) { if (is_front_page()) { return (''); } else { return ($title); } } add_filter('thematic_postheader_posttitle', 'remove_postheader_posttitle');
- The topic ‘remove redundant page title in Thematic’ is closed to new replies.