• 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

Display Post Date when there isn't a featured image

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 › Display Post Date when there isn't a featured image

This topic is: not resolved

Tagged: .post-info, decor, post-date

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 1 month ago by Susan.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 9, 2014 at 10:24 am #84187
    myersbr2
    Member

    I'm using a modified version of the Decor theme on our site, http://www.stacymakescents.com. When there is a featured image for a given blog post, the functions.php automatically adds a span for the post info (see http://www.stacymakescents.com/to-do-list-2014 for an example). However, if there isn't a featured image, there is also no date, etc. (see http://www.stacymakescents.com/valentine-funnies) for an example). I'd like the publish date, etc. details to show up either way, although I may change the span to a different CSS class (I can handle that part).

    The code driving this in functions.php (and also the image, I know):

    /** Add post image below post title */

    add_action( 'genesis_after_post_title', 'decor_post_image' );

    function decor_post_image() {

    if ( is_page() ) return;

    if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) {

    printf( '<span class="post-date">%s</span>%s', get_permalink(), do_shortcode( '[post_date format="j"][post_date format="F Y"]' ), $image, the_title_attribute( 'echo=0' ) );

    }
    }

    /** END Add post image below post title */

    http://www.stacymakescents.com
    February 21, 2014 at 10:51 am #91701
    Susan
    Moderator
    This reply has been marked as private.
  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2026 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