disable featured section on paginated Category pages

Posted in: Newspaper
Post count: 81

Hi,

We would like to disable featured section on paginated Category pages.

For instance removing the featured section at the top on for https://www.techuntold.com/category/reviews/page/2/, https://www.techuntold.com/category/reviews/page/3/ and so on.

Similarly for all the categories.

Thanks,
Hemant

Post count: 35449

HI,

If you do not want to have the grid on category page, you can disable it from theme panel -> http://prntscr.com/oibxe5 or if you want to have the grid on the first category page and remove it only for the rest of the category page, then you’ll need to use a custom code
if (document.body.classList.contains('category')) {
if (document.body.classList.contains('paged')) {
document.getElementsByClassName("td_block_big_grid_1")[0].style.display = "none";
}
}

The code need to be set in Theme Panel>Custom code> Custom JavaScript -> http://prntscr.com/oicaib

Hope this will help you!
Thank you!

Post count: 81

This code works:
if (document.body.classList.contains(‘category’)) {
if (document.body.classList.contains(‘paged’)) {
document.getElementsByClassName(“td_block_big_grid_1”)[0].style.display = “none”;
}
}

But it only hides the grid. We want to remove the links completely from the page’s source code.

Post count: 35449

Hi,

Unfortunately that can be done only with custom work, you’ll need to add some functions that can remove the blocks from category page if you are on the category loop/pagination.

Thank you for your understanding!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.