• 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

Different category functions

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 › Different category functions

This topic is: resolved
  • This topic has 3 replies, 2 voices, and was last updated 12 years, 3 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 10, 2014 at 12:20 pm #99537
    sinoun
    Member

    I don't know if this is possible, but does anyone know how I can just make the date show on a post for 1 category? I have 3 categories for my blog posts. I only want the dates to show on the post page for 1 specific category.

    If anyone has any insight, that would be awesome! Where and what code do I need to change?

    I'm using the Minimum theme if this helps.

    Thank you so much!
    Sinoun

    April 10, 2014 at 11:04 pm #99594
    Brad Dalton
    Participant

    Link to your site please.

    The code is already provided by StudioPress.

    You can simply add a conditional tag after the function in the code to remove the date from all posts in all except one category.


    Tutorials for StudioPress Themes.

    April 13, 2014 at 3:34 pm #100091
    sinoun
    Member

    Thank you very much for the reply, Brad. But if I knew how to customize the code and conditional code, I probably wouldn't have asked how to make these changes.

    I didn't include a link because my site is still under construction and it's not live. Also, I didn't see why anyone would need to see the site to help with this particular request.

    To all who needs to customize the way I asked, I did some more digging and found this to be very helpful: http://www.wpstuffs.com/remove-dates-for-posts-in-particular-category-genesis-framework/

    Essentially just copy and paste this code and insert your own categories in the 'cat-1' and 'cat-2' areas:

    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
      if( in_category( array('cat-1','cat-2') )) {
      		$post_info = 'Posted by [post_author_posts_link] [post_comments] [post_edit]';
    	}
    	else {
    		$post_info = '[post_date] by [post_author]  [post_comments] [post_edit]';
    	}
      return $post_info;
    }

    I should also note that this will conflict with Genesis Simple Edits plugin so use one ore the other. Hope that helps others!

    Sinoun

    April 14, 2014 at 5:39 am #100151
    Brad Dalton
    Participant

    You can also do exactly the same thing using CSS where you can grab the specific classes using Firebug and add the display: none; declaration.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Different category functions’ 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

© 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