WordPress.org

Ready to get started?Download WordPress

Forums

Montezuma
Comment box on top of comments? (3 posts)

  1. JuanAcosta1992
    Member
    Posted 1 year ago #

    Hi, I love your theme. Very good work.
    I have one small question... how can I make the comment box show at the top of the comments rather than at the bottom?

  2. CrouchingBruin
    Member
    Posted 1 year ago #

    You can do this using jQuery.

    Go to Appearance > Montezuma Options > Head > Insert code. This is the section that's handy for putting in any JavaScript that you need for your site. For example, if you are using Google Analytics to track web traffic to your site, you would put it here.

    In the Bottom field, add this:

    <script>
    jQuery(document).ready(function($){
    
        // Are there existing comments?
        if ($("#comments-title").length > 0)
        {
           // Move the reply (respond) section before the comment list
           $("#comments-title").before($("#respond"));
        }
    
    });
    </script>

    The jQuery ready() function will execute once the document is loaded. The first statement checks to see if there are any existing comments (in which case the comments title will be displayed). If so, then it moves the reply box above (before) it.

    If you have any other questions regarding the Montezuma theme, visit the Bytes for All support forum.

  3. JuanAcosta1992
    Member
    Posted 1 year ago #

    Thank you so much this worked like a charm.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic