• 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

Customizing Post Meta

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 › Customizing Post Meta

This topic is: resolved

Tagged: metadata

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 5 months ago by mtombs.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 13, 2014 at 4:28 am #84936
    mtombs
    Participant

    I'm using the Metro Pro Theme.

    At the moment each post shows post meta for category and tag archives. This means, for example, that on the archive page for a particular category each post is followed by a link to the same page. I'm trying to avoid these self-referencing links.

    What I want is:

    For each individual post to show the Category and Tag link.
    For posts on a category archive page to just show the tag link.
    For posts on a tag archive page to just show the category link.

    Is this possible?

    Many thanks,
    Michael

    January 13, 2014 at 11:46 am #84983
    Sridhar Katakam
    Participant

    http://sridharkatakam.com/different-post-meta-different-views-genesis/


    Genesis Tutorials | Follow me on Twitter

    January 14, 2014 at 2:27 am #85115
    mtombs
    Participant

    Dear Sridhar,

    Many thanks for that.

    I tried using the code and it didn't work. Then I started disabling my plugins to see if that helped. As soon as I disabled Genesis Simple Edits the code worked a treat.

    Is there some way that I can still use Simple Edits with this code? Or, if not, is there a way that I can change the default 'Filed under' and 'Tagged with' text and still use the code. I tried inserting this into my functions.php file, but as soon as I did your code stopped working:

    `//* Customize the post meta function
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    if ( !is_page() ) {
    $post_meta = '[post_categories before="Category: "] [post_tags before="Tag: "]';
    return $post_meta;
    }}

    Is there any way round this?

    Michael

    January 15, 2014 at 10:50 am #85352
    mtombs
    Participant

    Dear Sridhar,

    I've been able to modify your code a little to get exactly what I want. I have disabled the Simple Edits Plugin, and modified your code to:

    //* Customize the post meta function to show Tags on Category pages, Categories on Tag archives and both Tags and Categories on single Posts and views other than static Pages
    add_filter( 'genesis_post_meta', 'sk_post_meta_filter' );
    function sk_post_meta_filter($post_meta) {
    
    	if ( is_category() ) {
    		$post_meta = '[post_tags before="NEW TEXT: "]';
    	}
    	elseif ( is_tag() ) {
    		$post_meta = '[post_categories before="NEW TEXT: "]';
    	}
    	elseif ( !is_page() ) {
    		$post_meta = '[post_categories before="NEW TEXT: "][post_tags before="NEW TEXT: "]';
    	}
    	return $post_meta;
    
    }

    This has allowed me to modify the default ‘Filed under’ and ‘Tagged with’ text.

    Many thanks for your help.

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

© 2025 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