Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1360580

    Hello,

    I don’t want a sidebar on my archive categories pages.

    -I try to deactivate sidebar in enfold setting>sidebars>Sidebar on archive page but this will delete also sidebar on my shop site.

    Is there any other option to hide the sidebar only on archive page?

    Kind regards,
    Daniel Turk

    #1360734

    Hey dadisk8,

    Thank you for the inquiry.

    We can use the avia_layout_filter to adjust the layout of the archive or category pages. Please add this code in the functions.php file.

    add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2);
    function avia_change_post_layout($layout, $post_id) {
        if( is_archive() && is_category() ){
            $layout['current'] = $layout['fullsize'];
            $layout['current']['main'] = 'fullsize';
        }
    
        return $layout;
    }

    This should set the archives pages to have a full layout and remove the sidebar.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.