ThemeShaper Forums » Thematic


Changing Specific Post Title Content?

(7 posts)
  • Started 10 years ago by soupking
  • Latest reply from soupking
  • This topic is resolved
  1. soupking

    Hi Themeshapers,

    I have a situation where I have four menu pages and one of them is a blog. So for that one the title is needed, but I don't want a title in the others ones.

    I'm hip to page templates, but the content for these is entrenched in "<div id="post-57" class="post-57 post type-post status-publish format-standard hentry category-uncategorized">"...that. Which is in turn hierarchically embedded in three or so ID's.

    So how does one affect content-title when within something like this that's not only random, but not part of the main hook framework (as least that I can tell) ?

    Thanks in advance for any suggestions.

    Posted 10 years ago #
  2. seanhawkridge

    Not quite sure if I'm tracking, but if you mean targeting specific page titles on the actual pages, there are a few ways to get at them.

    You could break down that long list of dynamic classes into something more manageable, like just the post ID and the entry-title div like:

    #post-57 .entry-title

    Or I think if you turn on permalinks you can use the page slug in place of the post id. Or if you have a specific template you can use that to target specific divs, like:

    .single-tour .entry-title

    My method is usually just to pull apart the long list of cascaded styles until I have something neat and tidy that still works.

    Posted 10 years ago #
  3. seanhawkridge

    All this in CSS of course!

    Posted 10 years ago #
  4. middlesister

    What about filtering thematic_postheader_posttitle?

    function my_posttitles($posttitle) {
        global $post;
        if ( $post->ID == '57'  ) {    // the ID of the post/page you want to change
            // write your own title here
        return $posttitle;
    add_filter('thematic_postheader_posttitle' , 'my_posttitles' );
    Posted 10 years ago #
  5. seanhawkridge

    middlesister's is definitely the best solution if you want to actually change what the titles say.

    If you just want to hide the titles on the four specific posts then targeting them nicely in your CSS and using display:none might be quicker.

    Posted 10 years ago #
  6. middlesister

    True. You don't need a sledgehammer to squash a fly. :)

    Posted 10 years ago #
  7. soupking

    Brilliant you guys. I thought there has to be some simple reference but wasn't sure how it had to be executed.

    Thanks a bunch!!

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.