[Resolved] Change Archive Page to 3 Columns and Remove sidebar

Home Forums Support [Resolved] Change Archive Page to 3 Columns and Remove sidebar

Home Forums Support Change Archive Page to 3 Columns and Remove sidebar

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1675087
    Alan

    I have an archive page for my CPT (Tours) that is displaying posts in a single column see here https://www.savacations.com/tours/. I was able to remove the sidebar using elements/layout. I would like to change the layout to 3 columns similar to mys search results page here https://www.savacations.com/?s=chile. How do I do that?

    It is ok to keep the tour meta in place (title, duration, excerpt).

    Please let me know.

    Thanks,

    #1675257
    Ying
    Staff
    Customer Support

    Hi Alan,

    Have you tried the settings in customizer > layout > blog > Columns?

    Let me know ๐Ÿ™‚

    #1675269
    Alan

    Yes, the number of columns for that archive page is not adjustable from the customizer…I am already using three columns for the blog archive pages (see here https://www.savacations.com/category/south-america-travel/).

    Not sure if it maters or not, but this is an archive page for a CPT.

    #1675280
    Leo
    Staff
    Customer Support
    #1675313
    Alan

    Leo:

    Please forgive me, but I am not a developer.

    This is what I am using, but it is not working…

    add_filter( ‘generate_blog_columns’,’arc_tours_columns’ );
    function arc_tours_columns( $columns ) {
    if ( is_post_type_archive( ‘tours’ ) ) {
    return 33;
    }

    return $columns;
    }

    #1675491
    Leo
    Staff
    Customer Support

    Can you add this code?

    add_filter( 'generate_blog_columns','tu_portfolio_columns' );
    function tu_portfolio_columns( $columns ) {
        if ( is_post_type_archive( 'tours' ) ) {
            return true;
        }
    
        return $columns;
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Make sure your caching plugin is cleared.

    #1675518
    Alan

    Leo:

    That worked perfectly…

    Thanks!!

    #1675527
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

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