WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Comments not shown (25 posts)

  1. Shaun Janssens
    Member
    Posted 2 years ago #

    I just switched to WordPress JetPack 1.4 and the comment function looks very nice. But not on my website. It is not shown. Is there something like a shortcode or something to make use of this cool feature? My WordPress version is also updated to 3.4.

    http://wordpress.org/extend/plugins/jetpack/

  2. Trimmode
    Member
    Posted 2 years ago #

    Same as Shaun above, I activated it but I am not seeing any difference in my comment "system" on my blog.

  3. davedillonphoto
    Member
    Posted 2 years ago #

    Also having this issue on my custom template. I've done some digging in the plugin and can't seem to locate the function to display the jetpack comment icons.

    This is a similar problem in the sharing feature but can be fixed using <?php echo sharing_display();?>

    Jetpack developers... PLEASE INCLUDE A LIST OF FUNCTION TAGS WITH YOUR PLUGIN!

    It would make these things a lot easier to figure out. The hooks you're using only work on wordpress default templates properly!

  4. unigunde
    Member
    Posted 2 years ago #

    I'm also having this issue. Don't see new comments form.

  5. rftlasers
    Member
    Posted 2 years ago #

    Same here.

    Jetpack comments activated, but nothing new shows up on the site. Same old comments form.

    Theme is K2, if that helps.

  6. Tim Moore
    Moderator
    Plugin Author

    Posted 2 years ago #

    Jetpack Comments relies on the comment_form() function being used to display the comment form.

  7. Trimmode
    Member
    Posted 2 years ago #

    Tim Moore ~

    So for those of us who aren't seeing this new commenting system on our blogs, does this mean we have to add this function somewhere? (And know how to do this of course — I don't know much php)

    I am running Headway 2.1.3 theme.

  8. ericekidwell
    Member
    Posted 2 years ago #

    I'm having the very same problem. Should I be ading comment_form() to one my themes templates?

  9. taamirplus
    Member
    Posted 2 years ago #

    also having this issue,..

  10. mikeotgaar
    Member
    Posted 2 years ago #

    Found the same thing.
    Activated jetpack comments and lost all new comment forms as well as existing comments.
    De-activating Jetpack comments didn't restore form or existing comments - deleted Jetpack plugin via FTP, cleared cache - comments and forms back. Installed earlier version jetpack.1.3.4 and everything OK, then updated to 1.4.1 again and still OK (But left Jetpack comments OFF)
    (Theme - NomNom childtheme of TwentyEleven if that's a help - also have SI CAPTCHA so may have conflicted - I know Jetpack and CAPTCHA don't play together)

  11. Shaun Janssens
    Member
    Posted 2 years ago #

    Okay, I've found the solution! I do not speak enough English so I use google translate.

    It is actually very simple! you just have to replace your whole comment form with comment_form (). But do not remove the section of code that ensures that all comments are displayed. So only the form! Below the code of my comments.php file.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  12. Tim Moore
    Moderator
    Plugin Author

    Posted 2 years ago #

    Some themes hard code a comment form in place. WordPress has a function (comment_form()) that instead builds the comment form dynamically.

    If your theme hard codes the comment form, you or the theme author will need to replace it with comment_form() in order for Jetpack Comments to work correctly.

    If your theme already uses comment_form(), you should be all set.

    If you continue to experience issues, I'd recommend deactivating all plugins other than Jetpack and see if the comment form works. If it does, start activating plugins one by one until the form breaks. At that point, you will have found a plugin conflict that you can report to us for investigation.

    If none of this works, please get in touch with us at our support link. Include your site URL, theme name, active plugins, and a screenshot of your comment area.

  13. mateo360
    Member
    Posted 2 years ago #

    Hello Shaun

    What you mean exactly by :
    "you just have to replace your whole comment form with comment_form (). But do not remove the section of code that ensures that all comments are displayed."

    I guess it's in "comments.php" but don't know really what to replace !

    Thank you

  14. jdrick55
    Member
    Posted 1 year ago #

    I checked my comment-form.php and it looks like it has the function comment_form(). I deactivated all the plugins except for jetpack of course and it still didn't work. Please Help. Here are the codes: <?php

    global $current_user;
    get_currentuserinfo();

    ob_start();
    comment_form();
    ob_get_clean();

    ?>

  15. Tim Moore
    Moderator
    Plugin Author

    Posted 1 year ago #

    ob_start();
    comment_form();
    ob_get_clean();

    The issue is that your comment_form() is being put into an output buffer. If ob_get_clean() is on a line by itself and not being echo'd, then that is why your comments are not showing up.

    I'd recommend removing ob_start() and ob_get_clean().

  16. dtarin
    Member
    Posted 1 year ago #

    I removed all the goblely-gook from my previous theme that handled comments and replaced it with the simple line.
    <?php comment_form(); ?>

    That's awesome.

  17. els4vents
    Member
    Posted 1 year ago #

    This is my code in http://www.acapase.org. I tried all combinations, surely I forgot one.

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <?php
    
    /**
     *
     * comments.php
     *
     * The comments template. Used to display post or page comments and comment form.
     *
     * Additional settings are available under the Appearance -> Theme Options -> Comments.
     *
     */
    
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    	die ('Please do not load this page directly. Thanks!');
    
    if (post_password_required()) {
    	theme_post_wrapper(array('content' => '<p class="nocomments">' . __('This post is password protected. Enter the password to view any comments.', THEME_NS) . '</p>'));
    	return;
    }
    
    if (have_comments()){
    	ob_start();
    	printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), THEME_NS ), number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    	theme_post_wrapper(array('content'=>'<h4 id="comments">' .ob_get_clean() . '</h4>'));
    	$prev_link = get_previous_comments_link(__('Newer Comments <span class="meta-nav">→</span>', THEME_NS));
    	$next_link =  get_next_comments_link(__('<span class="meta-nav">←</span> Older Comments', THEME_NS));
    	theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
    	echo '<ul id="comments-list">';
    	wp_list_comments('type=all&callback=theme_comment');
    	echo '';
    	theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
    }
    if (function_exists('comment_form')){
    	ob_start();
    	$args = array();
    	if(theme_get_option('theme_comment_use_smilies'))
    	{
    		function theme_comment_form_field_comment($form_field){
    			theme_include_lib('smiley.php');
    			return  theme_get_smilies_js() . '<p class="smilies">' . theme_get_smilies() . '</p>' . $form_field;
    		}
    		add_filter('comment_form_field_comment', 'theme_comment_form_field_comment');
    	}
    	comment_form();
    	theme_post_wrapper(array('content' => str_replace(array(' id="respond"', 'type="submit"'), array('', 'class="estil-button" type="submit"'), ob_get_clean()), 'id' => 'respond'));
    	return;
    }
    
    if ('open' == $post->comment_status) {
    	ob_start();
    ?>
    <h3 id="comments-title"><?php comment_form_title( __('Leave a Reply', THEME_NS), __('Leave a Reply to %s', THEME_NS) ); ?></h3>
    <div class="cancel-comment-reply"><small><?php cancel_comment_reply_link(); ?></small></div>
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', THEME_NS), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
    <?php else : ?>
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <?php if ( $user_ID ) : ?>
    <p><?php printf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', THEME_NS), admin_url( 'profile.php' ), $user_identity, wp_logout_url(get_permalink())); ?></p>
    <?php else : ?>
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author"><small><?php _e('Name', THEME_NS); ?> <?php if ($req) _e("(required)", THEME_NS); ?></small></label></p>
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small><?php _e('Your email address will not be published.', THEME_NS); ?> <?php if ($req) _e("(required)", THEME_NS); ?></small></label></p>
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small><?php _e('Website', THEME_NS); ?></small></label></p>
    <?php endif; ?>
    <!--<p><small><?php printf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', THEME_NS), ' <code>' . allowed_tags() . '</code>' ) ?></small></p>-->
    <p><textarea name="comment" id="comment" cols="40" rows="10" tabindex="4"></textarea></p>
    <p>
    	<span class="estil-button-wrapper"><span class="estil-button-l"> </span><span class="estil-button-r"> </span>
    		<input class="estil-button" type="submit" name="submit" tabindex="5" value="<?php _e('Submit Comment', THEME_NS); ?>" />
    	</span>
    	<?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    </form>
    <?php endif;?>
    <?php
    	theme_post_wrapper(array('content' => ob_get_clean(), 'id' => 'respond'));
    }
  18. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    @els4vents Check the post above to find out how to change the comment form function:
    http://wordpress.org/support/topic/plugin-jetpack-by-wordpresscom-comments-not-shown?replies=17#post-3371310

  19. els4vents
    Member
    Posted 1 year ago #

    Thanks Jeremy, your plugin is great.

    But if I ask the question is because I have tried several options and I have not succeeded.

    Maybe someone can tell me which part of the code I have to replace which other code.

  20. elenatz
    Member
    Posted 1 year ago #

    Hi! I have the same issue with Jetpack Comments. Although I activated it and configured & saved it nothing changed. Please assist if everyone has solved it.

  21. elenatz
    Member
    Posted 1 year ago #

    Sorry I have no clue of codes but I found a more detailed explanation here:

    http://jetpackcomments.wordpress.com/2012/07/12/jetpack-comments-and-problems-not-showing/

    I tried it and it worked!!!

  22. somtam
    Member
    Posted 1 year ago #

    Sorry I can't figured out... in all my websites I call the comment section with
    comments_template();
    I don't use any custom comment template file, only personalize with css few little stuff ( color, font ecc... )

    But it doesn't show the new jetpack comment.
    Do I do something wrong?

    thanks!

  23. somtam
    Member
    Posted 1 year ago #

    Sorry I just find now...
    Just call comment_form(); instead of comments_template();

    thanks!

  24. foyjur
    Member
    Posted 1 year ago #

    I am going to switch all my blogs to Jetpack which is made by the same people who make WordPress. So the integration is excellent and very blog like.

  25. somtam
    Member
    Posted 1 year ago #

    Probably this is not an advertising post... the title is "Comments not shown in JetPack"... so?

    Anyway for developer, the problem was that you must have the template file comments.php in your template, and then insert comment_form() in that file instead of the form tag, and not substitute it with comments_template(); where you have to call the comments block.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic