• 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

Removing entry meta from certain posts, not all

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 › Removing entry meta from certain posts, not all

This topic is: resolved

Tagged: entry-meta

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 10 months ago by Lauren @ OnceCoupled.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 15, 2015 at 7:54 pm #144564
    hmistler
    Member

    Hi there - I would like to remove the post entry meta on my portfolio pages (for the portfolio, I am using a plugin that allows me to create custom post types and filter by categories). However, I would like to keep it on my blog pages. I've searched through many of the topics here in the forum but can't seem to find what what I need. I've tried to do the display:none in CSS but can't get it to work, and I'm wondering if there is a way to do this in php code so that any future entries I have will automatically not have the entry meta? This is the closest code I've found:

    add_action('template_redirect', 'customizePostMeta');
    function customizePostMeta(){
     if( is_category()){
        //* Remove the entry meta in the entry footer (requires HTML5 theme support)
        remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
       
       //* Remove the entry meta in the entry header (requires HTML5 theme support)
       remove_action(  'genesis_entry_header', 'genesis_post_info', 12 ); 
     }
    }

    In the line with if( is_category()){, will this remove the entry meta for ALL posts with categories? I'm just looking to remove it from the pages with my portfolio items. I had done this previously using specific page #s, but I'm hoping there is a better way. I can supply any more information needed! Thanks in advance, I really appreciate this forum and the help it offers!

    http://www.haleymistler.com/design/elizabeth-harrington/
    March 15, 2015 at 8:45 pm #144567
    Lauren @ OnceCoupled
    Member

    is_category() is referring to category archive pages, so it will remove the post meta from pages such as http://www.haleymistler.com/category/illustration. It will not remove post meta from the single posts, such as the one you're linking to.
    Reference: http://codex.wordpress.org/Function_Reference/is_category

    Depending on how your categories are set up, you may instead be looking for in_category() or, even better, is_singular( 'foo' ).
    Reference 1: http://codex.wordpress.org/Function_Reference/in_category
    Reference 2: http://codex.wordpress.org/Conditional_Tags#A_Single_Page.2C_a_Single_Post.2C_an_Attachment_or_Any_Other_Custom_Post_Type

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    March 16, 2015 at 7:03 am #144608
    hmistler
    Member

    Ah, it worked! I used my custom post type and the entry meta is now gone. Thank you!!

    March 16, 2015 at 10:00 am #144628
    Lauren @ OnceCoupled
    Member

    Glad you figured it out! 🙂


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Removing entry meta from certain posts, not all’ 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