1. Home
  2. ReHub Theme
  3. Useful code snippets

Useful code snippets

How to hide Compare icon in search results in header

.re-search-result-compare{display:none}

you can place this in theme options – general options – custom css

How to disable “Sort by” filter panel in Repick theme

If you don’t like it, you can hide

.filter_home_pick{display:none}

You can place this in theme options – general options – custom css. You can also create custom page and custom filter panel with page builder

How to disable Vendor block in single product page

Sometimes, you want to hide vendor pages from users on site. Usually, vendor plugins have option to disable “Sold by” badge in products, so, check settings of vendor plugin which you use. To hide also vendor block in single pages, use next code

.vendor_store_details{display:none}

You can place this in theme options – general options – custom css.

If your plugin doesn’t have option to disable Sold by label, use next code also

.wcvendors_sold_by_in_loop{display:none}

You can place this in theme options – general options – custom css.

How to hide Price history on Products

Sometimes you may need to hide price history section in products, use next

#section-woo-ce-pricehistory{display:none}

You can place this in theme options – general options – custom css.

How to show Buttons in Columned Grid for Woocommerce

Button is visible in columned grid only on hover action. You can enable it without hovering with next code

.woo_column_item{ border1px solid #eee; background:#fff}

.woo_column_item .woo_column_btn {display: block;position: static;border: none;padding: 15px 0 0 0;box-shadow: none;animation: initial !important;}

You can place this in theme options – general options – custom css.

How to show sidebar at left only on Shop archive pages

If you need to make sidebar at left on all pages, you can enable this in  theme option – appearance 

But if you need sidebar at left only on shop pages, use next

.post-type-archive-product .sidebar{float:left}

.post-type-archive-product .main-side{float:right}

You can place this in theme options – general options – custom css.

How to disable top wordpress bar

By default, wordpress adds special admin bar in top of site. Maybe you want to remove it from user’s accounts. You can do this in  theme option – user option – Disable admin bar for users? 

Sometimes, it will not help because some plugins can add additional bar. Usually, it’s Buddypress. So, disable it in  Settings – Buddypress – Options – ToolBar 

How to delete “Back to menu” links from autocontents

.kc__gotop{display:none}

you can place this in theme options – general options – custom css

How to change color of Notice counter

By default, color is red, you can change on other colors

.re-compare-notice, .rh-icon-notice{background:green}

you can place this in theme options – general options – custom css