• 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

Customise Post-Info

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 › Design Tips and Tricks › Customise Post-Info

This topic is: resolved

Tagged: .post-info

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 9 months ago by Jen Baumann.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 26, 2012 at 8:14 am #7457
    Treefungus
    Member

    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

    December 26, 2012 at 9:35 am #7461
    Treefungus
    Member

    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;

    }

    December 26, 2012 at 11:08 am #7481
    Jen Baumann
    Participant

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

    December 26, 2012 at 11:37 am #7488
    Treefungus
    Member

    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

    December 26, 2012 at 11:40 am #7490
    Jen Baumann
    Participant

    You're very welcome!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Customise Post-Info’ is closed to new 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