Jump to content

How to hide featured/popular products in all pages except main page.


MrWade

Recommended Posts

Hi @MrWade,

You can hide the featured or popular products block on all pages except the homepage by using a simple Smarty condition or CSS rule.

Option 1 – Smarty template check:
In your theme’s templates/_partials or homefeatured.tpl file, wrap the block with:

{if $page_name == 'index'} {include file='path/to/featured-products.tpl'} {/if}

This ensures it only loads on the main page.

Option 2 – CSS-only method (quick fix):
If you just want to hide it visually, add this to your custom CSS:

body:not(.index) .featured-products, body:not(.index) .popular-products { display: none !important; }

This hides the section on every page except the homepage.

The first method is cleaner (it doesn’t render the block at all), while the CSS approach works quickly without modifying templates.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...