Reposition Page Titles

Community Forums Forums Design Tips and Tricks Reposition Page Titles

This topic is: resolved

This topic contains 16 replies, has 4 voices, and was last updated by  Susan Nelson 10 months, 2 weeks ago.

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #45414

    Susan Nelson
    Participant
    Post count: 202

    Good morning!

    I had to move this over to my development server because I didn’t want the client to see it while we’re trying to figure this out. So, the link is now http://clients.ohhellodesigns.com/rmedia/

    I didn’t notice this yesterday, but the latest blog post title is being added to the home page. And this is my current code:

    // Move titles above the content sidebar wrap
    add_action( 'genesis_before', 'wsm_move_title' );
    function wsm_move_title() {
    if ( ( is_page() && !is_page_template( 'page_blog.php' ) ) || !is_single() ) {
    remove_action( 'genesis_post_title', 'genesis_do_post_title' );
    add_action( 'genesis_after_header', 'wsm_show_page_title_text', 2 );
    }
    }
    function wsm_show_page_title_text() {
    echo '<div class="top-title">';
    echo '<div class="wrap">';
    echo '<h1>' . get_the_title() . '</h1>';
    echo '</div>';
    echo '</div>';
    }
    

    Susan Nelson | Oh, Hello Designs | Twitter | Facebook

    #45651

    Susan Nelson
    Participant
    Post count: 202

    Chris, thanks again SO MUCH for all your help! This code works perfectly:

    // Move titles above the content sidebar wrap
    add_action( 'genesis_before', 'wsm_move_title' );
    function wsm_move_title() {
        if ( is_page() &#038;& !is_page_template( 'page_blog.php' ) ) {
            remove_action( 'genesis_post_title', 'genesis_do_post_title' );
            add_action( 'genesis_after_header', 'wsm_show_page_title_text', 2 );
        }
        elseif ( is_page_template( 'page_blog.php' ) ) {
            add_action( 'genesis_after_header', 'wsm_show_page_title_text', 2 );
        }
    }
    function wsm_show_page_title_text() {
    echo '<div class="top-title">';
    echo '<div class="wrap">';
    echo '<h1>' . get_the_title() . '</h1>';
    echo '</div>';
    echo '</div>';
    }
    

    Susan Nelson | Oh, Hello Designs | Twitter | Facebook

Viewing 2 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic.