• 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

Post_Info Filter not working in CPT

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 › Post_Info Filter not working in CPT

This topic is: not resolved
  • This topic has 4 replies, 4 voices, and was last updated 11 years, 11 months ago by Drew Fulton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 23, 2013 at 9:57 pm #81015
    Drew Fulton
    Member

    I have a Custom Post Type (called 'species') and am trying to use a filter to modify the Post_Info on the single post template (single-species.php). No matter what I do, it won't work. I can remove the Post_Info and then add it back in with my own function but that is tedious and totally unnecessary for my purposes. Any ideas why this won't work?

    add_filter( 'genesis_post_info', 'dailyspecies_post_info_filter' );
    function dailyspecies_post_info_filter($post_info) {
    if ( !is_page() ) {
    	$post_info = '[post_date]';
    	return $post_info;
    }}
    

    I am trying to filter both the Post Meta and the Post Info and neither will work? It seems to have been working on my testing server but won't on my live server now. Any ideas?

    Thanks,
    Drew


    Drew Fulton
    Drew Fulton Photography | Filming Florida

    December 23, 2013 at 11:26 pm #81020
    Summer
    Member

    First if you're using the single template, you don't need the conditional... there's no way that would ever be a page.

    Otherwise, yeah, that should work. Is there anything different between your test server and the live site? Different version of Genesis, or HTM5 vs xhtml?


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    December 23, 2013 at 11:43 pm #81022
    Genesis Developer
    Member

    Add this code in your single-species.php file

    add_filter( 'genesis_post_info', 'dailyspecies_post_info_filter' );
    function dailyspecies_post_info_filter($post_info) {
    	$post_info = '[post_date]';
    	return $post_info;
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    December 24, 2013 at 12:00 am #81026
    Brad Dalton
    Participant

    Here's another way to do it.

    Use this in a site specific plugin which is best in your case.


    Tutorials for StudioPress Themes.

    December 24, 2013 at 7:16 am #81055
    Drew Fulton
    Member

    Problem solved! I had forgotten I still had the Genesis Simple Edits plugin on from my very quick test site a while back! Turned it off and away we go. Thanks for the help!


    Drew Fulton
    Drew Fulton Photography | Filming Florida

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