Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #351663

    Hi!

    I’m trying to write a function which removes the default sidebar(s), from the archive page and only when a specific custom taxonomy / category is matched. Doing it via the Enfold settings isn’t option, because that would disable the sidebar for the blog post archive pages as well.

    I already have the taxomony check, but I can’t figure out what to do next. I tried multiple add filters and remove actions on both WP’s get_sidebar() and on some Enfold sidebar.php-related code, but that either didn’t work or it removed the sidebar plus the footer and the WP admin header completely… which is a bit too much :)

    Does anyone know how to remove sidebars, from custom taxonomy archives, using a function?

    Thanks in advance.

    Kind regards,

    Ralph

    #351793

    Hey!

    Ok, I did find a function, but it’s not specifically for Enfold (it’s for the Choices theme): https://kriesi.at/support/topic/portfolio-entries-archive-category-pages-full-page-with-no-sidebar/#post-282147

    Can someone please confirm whether I can use the Choices function for Enfold?

    Thank you,

    Ralph

    #352008

    Hi!

    Thank you for using Enfold.

    You can use this filter:

    add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2);
    function avia_change_post_layout($layout, $post_id){
    
        if(is_category('CATEGORY ID/NAME HERE'))
        {
            $layout['current'] = $layout["fullsize"];
            $layout['current']['main'] = "fullsize";
        }
        return $layout;
    }

    Cheers!
    Ismael

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