• 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

Remove author from post info on specific category

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 › Remove author from post info on specific category

This topic is: not resolved

Tagged: .post-info

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 9 months ago by John.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 15, 2012 at 1:56 pm #5439
    johnkwhite
    Member

    I want to hide the author info on post pages if a certain category is selected. Any easy solutions?

    December 15, 2012 at 2:42 pm #5447
    John
    Participant

    John,

    To clarify, are you wanting to remove the author info on a category archive page that displays posts from a certain category? Or on a single post that is in a certain category?

    John


    John Sundberg | blackhillswebworks.com
    A WordPress developer’s toolbox: Firebug | WordPress Codex | Google 😉

    December 15, 2012 at 8:24 pm #5486
    johnkwhite
    Member

    Sorry, should have been more clear. The latter. I'm curating stories from other sites in a category called "curated" and I want any post tagged with that to only show the date it was posted.

    Cheers.

    December 16, 2012 at 9:54 pm #5664
    johnkwhite
    Member

    Figured it out. Used Genesis Simple Hooks plug in. Went to genesis_before_post_content Hook and added:

    <?php if(in_category('curated')) { ?>
    <p>
    <?php echo get_the_date('M. j, Y'); ?></p>
    <?php  } else { ?>
    <p>by <span><?php echo get_the_author(); ?></span>
    <?php echo get_the_date('M. j, Y'); ?></p>
    <?php } ?>

    December 17, 2012 at 6:35 am #5721
    John
    Participant

    Nicely done, thanks for the update!


    John Sundberg | blackhillswebworks.com
    A WordPress developer’s toolbox: Firebug | WordPress Codex | Google 😉

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Remove author from post info on specific category’ 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