ThemeShaper Forums » Thematic

change page title

(6 posts)
  • Started 10 years ago by roar123
  • Latest reply from scottdeto
  • This topic is resolved
  1. roar123
    Member

    I have my front page set to a static page. It shows the title of the page as the title for the front page, how would I change that? w/o messing up the other pages titles

    Posted 10 years ago #
  2. I just thought of a simple solution for this last night for the theme I'm working on. Copy page.php into your child theme with something like:

    If custom field alt title is true
    Use custom field value
    Else
    Use the plain old title

    Then, the plain old title gets sent to the link (and title bar, unless you're using All-In-One SEO) while the page spits out whatever you like.

    Posted 10 years ago #
  3. Like so …

    <?php
        global $post;
        // Check for Alternate Title
        $alt_title = get_post_meta($post->ID, 'Alt Title', $single = true);
        if($alt_title !== '') {
            print '<h1 class="entry-title">' . $alt_title . "</h1>";
        } else {
    ?>
    
        			<?php thematic_postheader(); ?>
    
    <?php } ?>
    Posted 10 years ago #
  4. roar123
    Member

    well I feel bad I forgot I could just use all in one seo and do it that way.

    also another thing I was trying to do was hide <?php thematic_postheader(); ?>
    on a certain page like /?page_id=2

    i know u could do it but dont know how to call it

    <!-- if pageid ==2 -->
    if()
    {
    }
    else
    {
           <?php thematic_postheader(); ?>
    Posted 10 years ago #
  5. scottdeto
    Member

    I'd like a solution for this as well. I'm not sure I understand Ian's "like so" suggestion. Is that code supposed to go in an empty page.php in child directory?

    Posted 9 years ago #
  6. scottdeto
    Member

    I'll answer my own: I was trying to hide the <h1>Home</h1> on my home static page. I wanted to keep the page title (not meta title) on all other pages.

    In child css:

    body.slug-home .entry-title{
    display:none;
    }

    Posted 9 years ago #

RSS feed for this topic

Reply

You must log in to post.