Title: Create an exception?
Last modified: August 21, 2016

---

# Create an exception?

 *  [nihiliste123](https://wordpress.org/support/users/patricestudiobluemangocom/)
 * (@patricestudiobluemangocom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/create-an-exception/)
 * Would it be possible to create a CSS code to create an exception to avoid the
   button on the homepage of the website?
    Thanks !
 * [https://wordpress.org/plugins/scroll-back-to-top/](https://wordpress.org/plugins/scroll-back-to-top/)

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

 *  Plugin Author [joesexton00](https://wordpress.org/support/users/joesexton00/)
 * (@joesexton00)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/create-an-exception/#post-5147721)
 * Yeah, you could hook into the sbtt_button_markup filter and return an empty string
   if on the home page. In your theme’s functions.php add the following:
 * add_filter( ‘sbtt_button_markup’, ‘my_sbtt_filter’ );
    function my_sbtt_filter(
   $button_markup) { if (is_front_page()) { return “”; } else { return $button_markup;}}
 * Alternatively, you could add the following to the advanced css text field in 
   the admin settings panel. Substitute {home page container parent identifier} 
   with a css selector of a parent element on the home page. Usually WordPress themes
   add a post/page class to the body element, that would be a good selector to use.
 * {home page container parent identifier} .scroll-back-to-top-wrapper.show {
    display:
   none!important; }
 *  Thread Starter [nihiliste123](https://wordpress.org/support/users/patricestudiobluemangocom/)
 * (@patricestudiobluemangocom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/create-an-exception/#post-5147780)
 * It totally work.
    Thanks man. I do not know anything about codes but you made
   it so clear, that it seems like you did it for me. Thanks again.

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

The topic ‘Create an exception?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/scroll-back-to-top_fefefe.svg)
 * [Scroll Back To Top](https://wordpress.org/plugins/scroll-back-to-top/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/scroll-back-to-top/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/scroll-back-to-top/)
 * [Active Topics](https://wordpress.org/support/plugin/scroll-back-to-top/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/scroll-back-to-top/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/scroll-back-to-top/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [exception](https://wordpress.org/support/topic-tag/exception/)

 * 2 replies
 * 2 participants
 * Last reply from: [nihiliste123](https://wordpress.org/support/users/patricestudiobluemangocom/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/create-an-exception/#post-5147780)
 * Status: not resolved