[Resolved] Disable columns on specific archive pages

Home Forums Support Disable columns on specific archive pages

  • This topic has 3 replies, 2 voices, and was last updated 4 months ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1508942
    Fabien

    Hi,

    I’ve setup (using the customizer) a 3 columns layout for my blog archive page. Is it possible to disable (using a php function) the columns for specific post types ?

    Thanks !

    #1508945
    Fabien

    (Just to add something, I want to remove columns on my search result page)

    #1508946
    Fabien

    I’ve found a solution !

    add_filter( 'generate_blog_columns','tu_portfolio_columns' );
    function tu_portfolio_columns( $columns ) {
        if ( is_search() ) {
            return false;
        }
    
        return $columns;
    }
    #1509024
    David
    Staff
    Customer Support

    Glad to hear you found the solution!

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