How to remove sidebar on category pages only?

Genesis is providing the layout setting section on edit category page. You will go to edit category page, choose the “full width” layout and save the category settings. It is very easy job if you have 3-4 categories. But your site have 10, 20 or more categories then it would be very pain full work. I found the quick solution about it. Open your functions.php file and add this snippets at end of the file

Above code will only work for category pages. is_category() function is checking that user is on category archive page. Next line is adding the full width layout and removing the sidebar(s).

Pretty simple code. is it not?

Reader Interactions

Leave A Reply

Your email address will not be published. Required fields are marked *