• 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

Numbering Comments in Decor Child Theme

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 › Numbering Comments in Decor Child Theme

This topic is: resolved

Tagged: comments, comments.php, decor, numbering comments

  • This topic has 6 replies, 6 voices, and was last updated 9 years, 11 months ago by Sridhar Katakam.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • January 15, 2013 at 10:57 am #12072
    myersbr2
    Member

    I know it is possible to  number comments within WordPress and generally I wouldn't be afraid to jump into the comments.php and change things, but I'm learning with Genesis that is a no-no.  So...can anyone help me?

    In the Decor child theme, how do I number my comments? I wanted to use a tutorial similar to (http://bavotasan.com/2009/how-to-add-numbers-to-your-comments-in-wordpress/).

    January 25, 2013 at 8:04 pm #14934
    wpspeak
    Member

    You can use Greg Threaded Comment Numbering plugin.

    Use this code to add support to the plugin when using Genesis

    /** Add comment numbering */
    add_action( 'genesis_before_comment', 'modernblogger_numbered_comments' );
    function modernblogger_numbered_comments () {
        if (function_exists( 'gtcn_comment_numbering' ))
        echo gtcn_comment_numbering($comment->comment_ID, $args);
    }  

    This code was taken from Studiopress (tutorial section) few months ago and I just noticed they had remove it. Not sure why. But this code works and I'm using it on one of my themes I am currently develop.


    WP Speak | Help the Awesome #Genesiswp Community

    June 2, 2013 at 12:40 pm #43641
    SmockLady
    Member

    Yes, I have been using this too quite successfully until just recently. I now am having trouble with the plugin dipslaying according to my settings. I don't know which update messed it up (wordpress, genesis, or the/other plugin). My comment numbers only show 1, 2, 3, 4 etc when I have them set to show 1, 1.1, 1.2, 2. I host some giveaways and drawings on my blog and I don't count the comment replies which are showing the whole numbers instead of the tiered ellipsis numbers. This may be why the tutorial disappeared. So if anyone knows a fix or a different plugin I'd love to know it.

    March 19, 2014 at 7:24 am #95662
    shaybocks
    Member

    This function doesn't work unfortunately. I contacted the plugin developer about it and here's his incredibly unhelpful response below. Anyone else able to write a working function??

    "As you can probably guess, this has nothing to do with the plugin or with WordPress and everything to do with faulty theme modification via a function that is not giving the plugin what it requires. This repeats a question about basic coding and the same faulty functions which I received just yesterday, so I'm going to paste in yesterday's reply:

    As mentioned on the site, I'm not able to help folks with theme modifications beyond what is already provided in the plugin instructions, and not knowing anything about your particular theme or the particular theme-specific hooks you're using or when they fire and under what conditions, it is quite literally impossible to tell much of anything from the code samples.

    However, what I will say is that I cannot see any reason why the functions you have used would work at all, let alone work correctly, since the functions would not, as written, have any access to either $comment or $args and therefore cannot pass them correctly to the comment numbering function. I would imagine that if you traced what is happening with all errors displayed, you might see repeated warnings about these variables being unknown. If your theme can provide the values of $comment and $args via the hooks you're using, your functions will need those in order to operate correctly. There's a further problem with the structure of both functions, in that the comment numbering function already echoes by default unless a fourth optional parameter is passed in to suppress that behaviour.

    As I say, however, all this is theme-specific, so I'll need to leave you to it from here on out."

    March 19, 2014 at 11:33 am #95708
    shaybocks
    Member

    So after talking with Greg more, I now know that he doesn't even take on paid projects for wordpress development, so that's why he wasn't willing to help us out. He did give me more information, but unfortunately php programming is above my head:

    "In any case, the key for using the plugin via a custom function call attached to a hook is just making sure that the plugin gets passed what it needs in order to do its job. Any PHP developer will be able to look at the example functions and say "hey, wait a minute -- these functions don't have access to the two variables needed, so how can they pass those variables on to the plugin?". I don't use the Genesis themes myself, so I have no idea whether the hook being used with those example functions could actually supply those variables, but if it can, then all that would be needed would be to re-jigger the functions to make use of them and pass on the variables as the plugin requires. A developer happy to read through the Genesis code for the hook should be able to identify quickly whether the variables can be supplied and, if so, tweak the functions to make use of them."

    Any developers out there know how we can fix this?

    February 25, 2015 at 2:33 pm #142262
    achrae
    Member

    Any new results on this?

    I wish i was a php developer. ;-\

    March 8, 2016 at 8:43 pm #180966
    Sridhar Katakam
    Participant

    https://sridharkatakam.com/threaded-comment-numbering-genesis/


    Genesis Tutorials | Follow me on Twitter

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

© 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