Close

Account

Documentation

Forum

Menu

Move Comment form and remove website field

  • Post count: 19
    jgkgopi
    March 22, 2018 at 10:44 pm #29858

    Hi,

    1) Could please help me to move, comment form to above the comments sections.

    I want to display comment form to be displayed before the comments

    2) Help me to remove the website field in comment form.

    Thanks.

    Post count: 19
    jgkgopi
    March 22, 2018 at 11:05 pm #29860

    remove date from displaying in comments

    Post count: 2447
    Rai
    March 23, 2018 at 10:07 am #29876

    Hi,

    For this kind of change, you need to modify theme file, therefore please using a child theme so you could safely do an update in the future.

    1). In your child theme directory, add this file located at: jnews-child/fragment/comments.php :

    2) Still in your child theme directory, add this code to the bottom of the jnews-child/functions.php :

    Then, add this CSS code to jnews-child/style.css or simply just add it to Additional Style in customizer :

    Please let me know if you have questions.

    Thank you

    Post count: 19
    jgkgopi
    March 24, 2018 at 8:50 pm #29900

    Now Website field has been removed. But Date displaying the comment is not changed. see the attached image there date displaying as 4 month ago i want to remove that date.

    http://prntscr.com/ivpzf4

    Comment still displaying at last i want it to display once the post end or next to author box.

    IGNOU Date Sheet June 2018 Download http://www.ignou.ac.in

    Post count: 8291
    Adek
    March 26, 2018 at 7:50 am #29912

    Hi jgkgopi,

    1. Please try to move the modified comment file from this jnews-child/fragment/comments.php to this jnews-child/comments.php. You need to put that file into jnews-child folder (root theme folder).

    2. For the comment date, please try to put this CSS code below to the Customize > Additional Style:

    Thank you

    Post count: 19
    jgkgopi
    March 27, 2018 at 5:42 pm #29976

    `HI Adek,

    I want to display comment form before the comment and next to related post.
    Modified the code in child theme like mentioned in the post. But am not able to see the change.

    My requirement is to put comment form after related post.

    2) i dont want to hide comment meta form. I want to remove it for seo

    • This reply was modified 3 weeks, 2 days ago by  jgkgopi.
    Post count: 8291
    Adek
    March 28, 2018 at 11:15 am #30005

    Hi jgkgopi,

    1. It’s weird for me. Please try to replace the original theme file here wp-content/themes/jnews/comments.php

    2. Please try to follow the instruction in this article here http://www.wpbeginner.com/wp-themes/how-to-remove-date-and-time-from-wordpress-comments/.

    Let me know if you still getting the problem in there.

    Thank you

    Post count: 19
    jgkgopi
    March 29, 2018 at 11:45 am #30043

    HI,

    i want to know where comment meta details code added in jnews theme.

    Which File?
    Which line of code has the details?

    Post count: 19
    jgkgopi
    March 29, 2018 at 12:22 pm #30044

    HI,

    i want to know where comment meta details code added in jnews theme. Because from single post only comment meta form is displaying , so i want to know where that code is called? so i can remove it.

    Which File?
    Which line of code has the details?

    Post count: 8291
    Adek
    March 29, 2018 at 1:04 pm #30046

    Hi jgkgopi,

    For the comment, you can find the code in this file wp-content/themes/jnews/comments.php but we don’t have any additional code for comment meta. It will use default code for WordPress comment. Do you get a problem with modifying the comment meta in there? Let me know if you need a help in there.

    Thank you

    Post count: 19
    jgkgopi
    March 31, 2018 at 1:06 am #30086

    <?php
    global $post;

    if ( post_password_required() )
    return;

    $commenttype = apply_filters(‘jeg_comment_type’, get_theme_mod(‘jnews_comment_type’, ‘wordpress’));

    if ( $commenttype === ‘facebook’ )
    {
    echo ‘<div id=”comments” class=”comment-wrapper section” data-type=”‘ . esc_attr($commenttype) . ‘” data-id=”‘ . esc_attr(apply_filters(‘jeg_comment_id’, get_theme_mod(‘jnews_comment_facebook_appid’, ”))) . ‘”>’;
    echo “<h3 class=’comment-heading’>”;
    printf(jnews_return_translation(‘Discussion about this %s’,’jnews’, ‘discussion_about_this’), $post->post_type);
    echo “</h3>”;
    echo ‘<div class=”fb-comments” data-href=”‘ . get_the_permalink() . ‘” data-num-posts=”10″ data-width=”100%”></div>’;
    echo ‘</div>’;
    } else if ( $commenttype === ‘disqus’ ) {
    echo ‘<div id=”comments” class=”comment-wrapper section” data-type=”‘ . esc_attr($commenttype) . ‘” data-id=”‘ . esc_attr(apply_filters(‘jeg_comment_id’, get_theme_mod(‘jnews_comment_disqus_shortname’, ”))) . ‘”>’;
    echo “<h3 class=’comment-heading’>”;
    printf(jnews_return_translation(‘Discussion about this %s’,’jnews’, ‘discussion_about_this’), $post->post_type);
    echo “</h3>”;
    echo ‘<div id=”disqus_thread”></div>’;
    echo ‘</div>’;
    } else {

    if ( comments_open() || get_comments_number() )
    {
    if ( get_option(‘comment_registration’) && !is_user_logged_in() )
    {
    echo ‘<div id=”comments” class=”comment-wrapper section”>’;
    echo “<span class=’comment-login’>” . sprintf(jnews_return_translation(“Please login to join discussion”, “jnews”, ‘please_login_join_discussion’, false), wp_login_url(home_url(), false)) . “</span>”;
    echo ‘</div>’;
    } else {
    if (have_comments()) { ?>
    <div id=”comments” class=”jeg_comments”>
    <h3 class=”comments-title”>
    <?php jnews_print_translation(‘Comments’, ‘jnews’, ‘comments’); ?>
    <span class=”count”><?php echo esc_html(number_format_i18n(jnews_get_comments_number())); ?></span>
    </h3>

    <div class=”jeg_commentlist_container”>

      <?php
      wp_list_comments(array(
      ‘avatar_size’ => ’55’,
      ‘short_ping’ => true,
      ‘walker’ => new \JNews\Comment\CommentWalker
      ));
      ?>

    </div>

    <?php if (get_comment_pages_count() > 1 && get_option(‘page_comments’)) : ?>
    <div class=”comment-navigation navigation”>
    <div class=”prev-comment”>
    <?php next_comments_link(jnews_return_translation(‘Previous’, ‘jnews’, ‘previous’)) ?>
    </div>
    <div class=”next-comment”>
    <?php previous_comments_link(jnews_return_translation(‘Next’, ‘jnews’, ‘next’)) ?>
    </div>
    </div>
    <?php endif; ?>
    </div>

    <?php
    }

    comment_form();
    }
    }
    }

    this is the code am seeing,

    Which File?
    Which line of code has the details?

    Post count: 8291
    Adek
    April 2, 2018 at 10:09 am #30120

    Hi jgkgopi,

    For the comment meta, as i said previously above, we don’t have any additional code for comment meta. It will use default code for WordPress comment.

    If you want to delete it, you can follow the instruction on this article http://www.wpbeginner.com/wp-themes/how-to-remove-date-and-time-from-wordpress-comments/. Did you’ve tried it before? or it doesn’t work on your side? Let me know if you need a help in there.

    Thank you

    Post count: 19
    jgkgopi
    April 3, 2018 at 11:35 pm #30153

    i tried that method but still the date is displaying.

    i added the functions in child themes functions.php but still date is displaying 🙁

    Post count: 19
    jgkgopi
    April 4, 2018 at 1:05 am #30158

    could you please tell about where this function is there
    wp_list_comments

    Post count: 19
    jgkgopi
    April 4, 2018 at 1:13 am #30159

    this is the code displaying comments with date.

    <div class=”comment-meta commentmetadata”>
    <i class=”fa fa-clock-o”></i>
    comment_ID, $args ) ); ?>”>
    <?php echo jnews_ago_time( human_time_diff(mysql2date(‘U’,$comment->comment_date), current_time(‘timestamp’) ) ); ?>

    <?php edit_comment_link( jnews_return_translation(‘(Edit)’, ‘jnews’, ‘edit_comment’), ‘  ‘, ” ); ?>
    </div>

You must be logged in to reply to this topic.