• 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 not show the post date for specified categories

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 › How to not show the post date for specified categories

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 7 years, 5 months ago by Helen.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 1, 2015 at 12:02 pm #167163
    Helen
    Member

    Does anyone know a way to NOT show the post date for one or more categories and if I can specify those categories? I'm using Genesis Simple Edits plugin, I can remove or not show the post date easily with that, but that means that all posts don't have date.

    October 2, 2015 at 12:25 pm #167244
    Brad Dalton
    Participant

    You can use code however it may not work if you have the Simple Edits plugin activated:

    Something like:

    add_filter( 'genesis_post_info', 'sp_post_info_filter' );
    function sp_post_info_filter($post_info) {
    if ( is_category(array( 1,2,3 ))) {
    	$post_info = 'by [post_author_posts_link] [post_comments] [post_edit]';
    	return $post_info;
    }
    

    Where 1,2,3 are you category i.d's you want to remove the post date from.

    Assumes you want to remove the post date from the category archive pages otherwise use, in_category to remove from posts in those categories.


    Tutorials for StudioPress Themes.

    October 7, 2015 at 11:46 am #167626
    Helen
    Member

    Thanks, Brad! I got this to work in a test setting.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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

© 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