Title: how to remove this function
Last modified: August 13, 2017

---

# how to remove this function

 *  [nanny7](https://wordpress.org/support/users/nanny7/)
 * (@nanny7)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/)
 * How to remove this function as I have comments turned off but it still shows 
   comments on post
 *     ```
       add_action( 'kadence_single_post_after', 'virtue_post_comments', 40 );
       function virtue_post_comments() {
         comments_template('/templates/comments.php');
       }
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Kevin](https://wordpress.org/support/users/jx-3p/)
 * (@jx-3p)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/#post-9408881)
 * You can hide comments on posts by going into the post edit screen, and enabling“
   Discussion” under the “Screen Options” at the top of the page.
 * When enabled, scroll down to the page and find “Allow Comments.” Be sure that
   box isn’t checked, and your post will not display any comments.
 * -Kevin
 *  Thread Starter [nanny7](https://wordpress.org/support/users/nanny7/)
 * (@nanny7)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/#post-9409683)
 * Thanks that works for that one post but having so many in the system I was hoping
   to remove the function site wide seeing I had already turned it off in theme 
   options.
    I also want to be able to remove the function of and remove the metaboxes
   for posts as I am using Divi pagebuilder instead of SiteOrigin as it gives me
   more options for design. Is there a way to do this.
 * Thanks so much for your help, love the theme just want to change the posts pages
   🙂
 *  Thread Starter [nanny7](https://wordpress.org/support/users/nanny7/)
 * (@nanny7)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/#post-9409702)
 * Otherwise is there a way to make these posts by default not have a sidebar and
   to remove the comments metabox with its function in case they want to change 
   it back to the theme options 🙂
 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/#post-9410283)
 * Hi nanny7,
    Can you please provide a link to your site so I can see how things
   are set up? Thanks!
 * Hannah
 *  Thread Starter [nanny7](https://wordpress.org/support/users/nanny7/)
 * (@nanny7)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/#post-9412975)
 * [Robank Feeds](https://robankfeeds.com.au)
    I have the primary sidebar on the
   home page but when you click on the link and go to the post page it won’t let
   you select a sidebar other than primary or news.
 * I change the name for blog to be news. On Nutrition > Nutrition Articles I use
   Divi to add to every post so the sidebar is the same. If you click on a post 
   it has same sidbar as the articles page so it is easy for the client.
 * thanks
    -  This reply was modified 8 years, 9 months ago by [nanny7](https://wordpress.org/support/users/nanny7/).
 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/#post-9413213)
 * Please see this thread: [https://wordpress.org/support/topic/custom-single-side-bar-not-working/#post-9413196](https://wordpress.org/support/topic/custom-single-side-bar-not-working/#post-9413196)
 * Hannah

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘how to remove this function’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/virtue/3.4.15/screenshot.png)
 * Virtue
 * [Support Threads](https://wordpress.org/support/theme/virtue/)
 * [Active Topics](https://wordpress.org/support/theme/virtue/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/virtue/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/virtue/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [hannah](https://wordpress.org/support/users/hannahritner/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/how-to-remove-this-function/#post-9413213)
 * Status: not resolved