• 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

Code error?

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 › Code error?

This topic is: not resolved

Tagged: genesis_post_info, is_category

  • This topic has 3 replies, 2 voices, and was last updated 5 years, 7 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 7, 2018 at 6:17 am #216196
    jaychan
    Participant

    Hello,

    I use the following code snippet (part from wpsites.net):

    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    add_filter( 'genesis_post_info', 'sp_post_info_filter', 12 );
    function sp_post_info_filter($post_info) {
    if ( is_archive() && !in_category('48') ) { 
    	$post_info = '[post_date] • [post_categories before=""] • [post_tags before=""]';
    	return $post_info;
    }
    if ( is_single() && !in_category('48') ) { 
    	$post_info = '[post_categories before=""] [post_tags before=""]';
    	return $post_info;
    }	
       }
    

    Since then, the site load really slow, Is there something wrong with it please?

    Thank you for your suggestion.

    February 7, 2018 at 7:02 am #216197
    Brad Dalton
    Participant

    Link to the post where you got the code.


    Tutorials for StudioPress Themes & WooCommerce.

    February 7, 2018 at 7:59 am #216202
    jaychan
    Participant

    The original code is to reposition meta date from bottom to top, then I add condition to it.

    Wondering if something wrong!

    February 8, 2018 at 12:16 pm #216352
    Brad Dalton
    Participant

    I would check your conditional tag. Try is_category.

    Like this :

    if ( is_category( '48' ) )
        return;
    

    Tutorials for StudioPress Themes & WooCommerce.

  • 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

© 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