• 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 post data on category page except post title

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 › General Discussion › Remove post data on category page except post title

This topic is: resolved

Tagged: remove post data

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 5 months ago by Jen Baumann.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 7, 2012 at 3:20 am #3682
    Marco
    Member

    I want to remove all post data from the category pages so i only have the post titles left.

    The problem with this code is it also removes content from normal pages like my "contact"page and gravityforms don't show up.

    /** remove post data on category page except post title **/
    remove_action('genesis_after_post_content', 'genesis_post_meta');
    remove_action('genesis_before_post_content', 'genesis_post_info');
    remove_action('genesis_post_content', 'genesis_do_post_content');

    add_action('template_redirect', 'child_conditional_actions');
    function child_conditional_actions() {
    if( is_single() ) {
    add_action('genesis_after_post_content', 'genesis_post_meta');
    add_action('genesis_post_content', 'genesis_do_post_content');
    }}

    How can i get my content back on normal pages like "contact" etc.?


    Where to find me: Facebook | Google + | Twitter | Website

    December 7, 2012 at 1:55 pm #3769
    Jen Baumann
    Participant

    You actually need to use this code in the reverse.  Put your remove actions within the conditional. If you are just trying to do this on the category pages, then your conditional is is_category().  More on conditionals: http://codex.wordpress.org/Conditional_Tags

    December 8, 2012 at 9:16 am #3841
    Marco
    Member

    This code worked for me:

    add_action('template_redirect', 'child_conditional_actions');
    function child_conditional_actions() {
    if ( is_category()) {
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    remove_action( 'genesis_post_content', 'genesis_do_post_content' );
    }}

    Thanks for pointing out Jen!


    Where to find me: Facebook | Google + | Twitter | Website

    December 8, 2012 at 10:11 am #3846
    Jen Baumann
    Participant

    You're welcome!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove post data on category page except post title’ 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