• 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_comments] parameters are not working

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 › [post_comments] parameters are not working

This topic is: not resolved

Tagged: shortcode

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 7 months ago by carasmo.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • October 7, 2016 at 5:12 am #194326
    outsidethebox
    Member

    Hello,

    I recently noticed that [post_comments] parameters are being ignored. I'm using Genesis 2.4.2 and eleven40 Pro Theme 2.0. $post_info is customized as follows, with [post_comments] according to the reference

    add_filter( 'genesis_post_info', 'vad_post_info_filter' );
    function vad_post_info_filter($post_info) {
    if ( is_single() ) 
    		{
    		$post_info = '[post_categories] | Updated on: [genesis_modified_date] | [post_comments zero="Start discussion!" one="Comments: 1" more="Comments: %" hide_if_off="disabled"] [post_edit]';
    		}
    else {
    		$post_info = '[post_categories] | [post_comments zero="Start Discussion!" one="Comments: 1" more="Comments: %" hide_if_off="disabled"] [post_edit]';
    		}
    	return $post_info;
    }

    Until recently the comment count was displayed as desired: Comments: N. Then it changed to comments N. I only updated Wordrpess in between, and updating Genesis to the latest version didn't change anything.

    There's not much difference in display, but capitalization and ":" are missing. It doesn't look right, especially in Russian, which is the WordPress language. In general, the shortcode parameters are now ignored.

    I'll appreciate any ideas on how to address the issue.

    October 7, 2016 at 6:34 am #194332
    outsidethebox
    Member

    Upd (can't edit the original post). The question is specifically about the "more" parameter, because the other two work.

    October 7, 2016 at 1:18 pm #194358
    carasmo
    Participant

    That is puzzling. I just tried it and it worked in the order you had it and the other way. Usually when weird stuff happens, I switch to the starter theme and paste that code into the functions.php there and then test, that way I can rule out where to look if it works there and not in my theme.

    Also, I don't see where you are testing to see if the date is modified, my code looks like this:

    function christina_post_info( $post_info ) {
    
    	if ( get_the_modified_time() != get_the_time() ) {
    
    		//* if the date is modified show last updated
    		$post_meta = 'Updated on [post_modified_date]<span> &middot; </span>Created on [post_date] by [post_author_posts_link] [post_comments] [post_edit]';
    
    	} else {
    
    		//* original date
    		$post_meta = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
    
    	} //* endif
    
    	return $post_meta;
    
    }
    add_filter( 'genesis_post_info', 'christina_post_info' );

    Genesis Theme Customization and Help

    October 8, 2016 at 2:38 am #194373
    outsidethebox
    Member

    @carasmo
    Thanks for double-checking and confirming it works for you. Your code has the same issue with "more" on my site. What starter theme are you talking about?

    But still, I haven't made any changes to functions.php or Genesis, the issue just came out of the blue. As for modified date, I removed some code, because it was not the point.

    October 8, 2016 at 8:20 am #194378
    carasmo
    Participant

    The starter theme that comes with Genesis framework. It's used by some developers as a starting point and I use it for debugging Genesis specific code.

    I would test your site with the starter theme. It's not your child theme that has the shortcodes, it's the parent framework. If the same thing happens with the Starter theme, then it's probably a plugin. This is a guess.

    I would turn on debugging in your wp-config.php.

    Find:

    define('WP_DEBUG', false);

    change to :

    define('WP_DEBUG', true);

    Visit your site, what messages, if any, do you get?

    Copy those down in some manner.

    Turn off debugging.


    Genesis Theme Customization and Help

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ 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

© 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