Customise Post-Info

Community Forums Forums Design Tips and Tricks Customise Post-Info

This topic is: resolved

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  Jen Baumann 1 year, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7457

    Treefungus
    Participant
    Post count: 51

    I have copied this code from Luscious theme function.php hoping to remove the date in post-info and place the new custom date with the title. I almost succeeded except the old standard date is still in the post-info. I am hoping someone can guide me a little bit.

    I am no master in Genesis so my question might seem silly to you but I cannot figure our why the standard date is still showing up.
    /** Add date block before post title */
    add_action( ‘genesis_before_post_title’, ‘custom_post_date’ );
    function custom_post_date() {

    if ( ! is_page() ) {
    echo ”;
    echo do_shortcode( ‘Feb 6, 2012 ‘ );
    echo ”;
    }

    }

    /** Customize the post info function */
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter( $post_info ) {

    if ( ! is_page() ) {
    return ‘By · Leave a Comment ‘;
    }

    return $post_info;

    }

    Here is the website  http://nintendowiifitconsole.co.uk/?p=563

    Thank you

    • This topic was modified 1 year, 11 months ago by  Treefungus.
    • This topic was modified 1 year, 11 months ago by  Treefungus.
    #7461

    Treefungus
    Participant
    Post count: 51

    Sorry… here is the correct code. Not sure why the code had changed but I still have a problem.

    /** Add date block before post title */
    add_action( ‘genesis_before_post_title’, ‘custom_post_date’ );
    function custom_post_date() {

    if ( ! is_page() ) {
    echo ‘<div class=”post-date”>’;
    echo do_shortcode( ‘[post_date format="M j, Y"]‘ );
    echo ‘</div><!– end .post-date –>’;
    }

    }

    /** Customize the post info function */
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter( $post_info ) {

    if ( ! is_page() ) {
    return ‘By [post_author_posts_link] &middot; [post_comments] [post_edit]‘;
    }

    return $post_info;

    }

    #7481

    Jen Baumann
    Keymaster
    Post count: 444

    Are you using Genesis Simple Edits? http://wordpress.org/extend/plugins/genesis-simple-edits/


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #7488

    Treefungus
    Participant
    Post count: 51

    How embarrassing. I installed that plugin but never used it. I deactivated it and now it is working. I guess it was overriding my code. Silly me.

    Thanks for helping me out

    #7490

    Jen Baumann
    Keymaster
    Post count: 444

    You’re very welcome!


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Customise Post-Info’ is closed to new replies.