How to display Author and date on pages

Community Forums Forums General Discussion How to display Author and date on pages

This topic is: resolved

Tagged: ,

This topic contains 6 replies, has 3 voices, and was last updated by  tobyhage 9 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #83877

    tobyhage
    Member
    Post count: 3

    Hello,

    On my pages the author and date are not displayed, i don’t know why. See for example: http://www.vlieginfo.com/reisverzekering/

    On my posts and custom post type pages author and date are displayed. See for example: http://www.vlieginfo.com/vliegtickets/rome/

    Hopefully someone can help me, because i’am searching half a day for a solution and cannot find it.

    Thanks in advance

    http://www.vlieginfo.com/
    #83880

    RobG
    Participant
    Post count: 1055

    Try adding this to your function.php file it may also require a bit of CSS to customize the color for your font as well.
    I would think your theme would have this function already unless it was removed.

    [php]
    //* Customize the post info function
    add_filter( ‘genesis_post_info’, ‘sp_post_info_filter’ );
    function sp_post_info_filter($post_info) {
    if ( !is_page() ) {
    $post_info = ‘[post_date] by [post_author_posts_link] [post_comments] [post_edit]‘;
    return $post_info;
    }}

    [/php]


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #83882

    tobyhage
    Member
    Post count: 3

    Hello Rob,

    Thank you for the fast response. But this is not what i needed. I do want to display the author and date on pages.
    The genesis_post_info is not executed on pages only on posts.

    Do you have another suggestion?

    #83905

    RobG
    Participant
    Post count: 1055

    What theme are you using?


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #83907

    tobyhage
    Member
    Post count: 3

    I made it myself.

    #83950

    genwrock
    Member
    Post count: 739

    Add this code in your functions.php file

    add_action( 'genesis_entry_header', 'genesis_page_info', 18 );
    add_filter( 'genesis_page_info', 'do_shortcode', 20 );
    
    function genesis_page_info() {
    
    global $post;
    
    if (is_page()):
    
    	$post_info = apply_filters( 'genesis_page_info', '[post_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link]' );
    
    	genesis_markup( array(
    		'html5' => sprintf( '<p class="entry-meta">%s</p>', $post_info ),
    		'xhtml' => sprintf( '<div class="post-info">%s</div>', $post_info ),
    	) );
    
       endif;
    }

    See My PRO Genesis Child Themes | Need Genesis Developer? | Follow Me on Twitter

    • This reply was modified 9 months, 3 weeks ago by  genwrock.
    • This reply was modified 9 months, 3 weeks ago by  genwrock.
    #83957

    tobyhage
    Member
    Post count: 3

    Thank you very much. It was more difficult than i thought!

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

You must be logged in to reply to this topic.