Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #178056

    Hello,
    I would like to hide the comments on all blog posts as well as the number of comments shown on the blog page under the title info.

    Thanks,
    Laura

    #178440

    Hey lhuston!

    1) Please add following code to Quick CSS in Enfold theme options under Styling tab

    .comment_meta_container, .sidebar_right .comment_container { display: none; }

    2) In your WordPress theme directory, please go to enfold\includes folder and open loop-index.php file and search for

    if ( get_comments_number()

    It should be in 120th line. Comment lines from 120 to 129 as shown here http://i.imgur.com/G12RLk5.jpg

    Regards,
    Yigit

    #188033

    Hi Yigit! I didn’t quite understand the solution you gave to remove the comments count from below the post title.

    Could you please re-explain?

    #188060

    Hi!

    You should go to enfold\includes folder and open open loop-index.php file. Then search for

    if ( get_comments_number()

    It is the starting of the first line as shown here http://i.imgur.com/G12RLk5.jpg
    so you should replace

    if ( get_comments_number() != "0" || comments_open() ){
    
                        echo "<span class='comment-container minor-meta'>";
                        comments_popup_link(  "0 ".__('Comments','avia_framework'),
                                              "1 ".__('Comment' ,'avia_framework'),
                                              "% ".__('Comments','avia_framework'),'comments-link',
                                              "".__('Comments Disabled','avia_framework'));
                        echo "</span>";
                        echo "<span class='text-sep text-sep-comment'>/</span>";
                        }

    with following

    //if ( get_comments_number() != "0" || comments_open() ){
    
                        //echo "<span class='comment-container minor-meta'>";
                        //comments_popup_link(  "0 ".__('Comments','avia_framework'),
                             //                 "1 ".__('Comment' ,'avia_framework'),
                           //                   "% ".__('Comments','avia_framework'),'comments-link',
                         //                     "".__('Comments Disabled','avia_framework'));
                        //echo "</span>";
                        //echo "<span class='text-sep text-sep-comment'>/</span>";
                        //}

    Regards,
    Yigit

    #188072

    Yep, that did work in the post single page but it didn’t work on the blog posts I added through the Avia Layout Builder on my homepage. What should I do?

    #188073

    Hey!

    Can you post the link to your website?

    Best regards,
    Yigit

    #188076

    Sure! Here: http://www.havengrid.com.br/

    Note that the comments count was removed from the post single page using the tip you gave me, but they still appear in the frontpage.

    #188078

    Hey!

    Please try adding following code to Quick CSS in Enfold theme options under Styling tab

    .home .slide-meta-comments,.home .slide-meta-del { display: none; }

    Cheers!
    Yigit

    #188087

    Sorry man, that did not work. Those blog posts are not a ‘post slider’ content element, they are normal ‘blog post’ add with the Avia Layout Builder.

    #188098

    Hey!

    Please try adding !important to force it so it should be

    .home .slide-meta-comments,.home .slide-meta-del { display: none!important; }

    Please browser cache after applying the code and refresh your page a few times. It does work on my installation

    Best regards,
    Yigit

    #188104

    YEAH! You did it! The trick works great!

    Can I please make one more question: how can I hide the author name?

    #188106

    Hi!

    You should go back to enfold\includes folder and open open loop-index.php file and find

    the_author_posts_link();

    it should be on 159th line. You should replace following lines which are between 152-160

    echo '</span><span class="text-sep text-sep-cat">/</span>';
                        }
    
    
                        echo '<span class="blog-author minor-meta">'.__('by','avia_framework')." ";
                        echo '<span class="entry-author-link" '.avia_markup_helper(array('context' => 'author_name','echo'=>false)).'>';
                        echo '<span class="vcard author"><span class="fn">';
                        the_author_posts_link();
                        echo '</span></span>';

    with

    //echo '</span><span class="text-sep text-sep-cat">/</span>';
                        }
    
    
                        //echo '<span class="blog-author minor-meta">'.__('by','avia_framework')." ";
                        //echo '<span class="entry-author-link" '.avia_markup_helper(array('context' => 'author_name','echo'=>false)).'>';
                        //echo '<span class="vcard author"><span class="fn">';
                        //the_author_posts_link();
                        //echo '</span></span>';

    If you have more questions, please start a new thread

    Cheers!
    Yigit

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Remove Comments’ is closed to new replies.