• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to display Author and date on pages

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: resolved

Tagged: Author, pages

  • This topic has 6 replies, 3 voices, and was last updated 9 years, 2 months ago by tobyhage.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • January 7, 2014 at 3:39 pm #83877
    tobyhage
    Member

    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/
    January 7, 2014 at 3:52 pm #83880
    RobG
    Member

    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.

    //* 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;
    }}
    
    

    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

    January 7, 2014 at 4:05 pm #83882
    tobyhage
    Member

    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?

    January 7, 2014 at 4:53 pm #83905
    RobG
    Member

    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

    January 7, 2014 at 4:57 pm #83907
    tobyhage
    Member

    I made it myself.

    January 8, 2014 at 1:15 am #83950
    Genesis Developer
    Member

    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;
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    January 8, 2014 at 3:51 am #83957
    tobyhage
    Member

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

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble