ThemeShaper Forums » Thematic

[closed]

front page post meta question

(3 posts)
  • Started 2 years ago by craw
  • Latest reply from helgatheviking
  • This topic is resolved
  1. craw
    Member

    I'm trying to figure out how to get my post meta to be above the post title except on the front page.

    I'm using this code to and it works- but it affects the front page.

    // Move meta above title in Post Header

    function childtheme_override_postheader() {

    global $post;

    if ( is_404() || $post->post_type == 'page') {
    $postheader = thematic_postheader_postmeta();
    } else {
    $postheader = thematic_postheader_postmeta() . thematic_postheader_posttitle();
    }

    echo apply_filters( 'thematic_postheader', $postheader );
    }

    How would I get the front page back to normal (the title above the post meta)?

    I've tried the code below with no success- is this even moving in the right direction? Thanks for any help!

    function childtheme_override_postheader() {

    global $post;

    if ( is_404() || $post->post_type == 'page') {
    $postheader = thematic_postheader_postmeta();
    } else {
    $postheader = thematic_postheader_postmeta() . thematic_postheader_posttitle();
    }

    if ( is_home()) {
    $postheader = thematic_postheader_posttitle();
    } else {
    $postheader = thematic_postheader_posttitle() . thematic_postheader_postmeta();
    }

    echo apply_filters( 'thematic_postheader', $postheader );
    }

    Posted 2 years ago #
  2. craw
    Member

    Here's the answer if anyone is interested

    This will keep the post meta below the title on the front page (if you have not set a page to be the front page)

    Keep the post meta below the title on the "blog" page

    and put the post meta above the title on all the other blog pages (single post, categories, archives)

    If you know a better way or one that is more flexible, please feel free to post.

    // Move meta above title in Post Header

    function childtheme_override_postheader() {

    global $post;

    if ( is_home() || $post->post_type == 'page') {
    $postheader = thematic_postheader_posttitle(). thematic_postheader_postmeta();
    } else {
    $postheader = thematic_postheader_postmeta() . thematic_postheader_posttitle();
    }

    echo apply_filters( 'thematic_postheader', $postheader ); // Filter to override default post header
    }

    Posted 2 years ago #
  3. should also be able to use that filter

    function childtheme_postheader() {
    
    global $post; //not sure this is needed
    
    if ( is_home() || is_page() ) {
    $postheader = thematic_postheader_posttitle(). thematic_postheader_postmeta();
    } else {
    $postheader = thematic_postheader_postmeta() . thematic_postheader_posttitle();
    }
    
    return $postheader;
    }
    add_filter('thematic_postheader','childtheme_postheader');
    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.