Site logo

[Resolved] How to do: 3 columns by default and 2 colums for a special category ?

Home Forums Support [Resolved] How to do: 3 columns by default and 2 colums for a special category ?

Home Forums Support How to do: 3 columns by default and 2 colums for a special category ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2538955
    jmarc

    Hello

    I would like to get what is in the title please but I cannot do it alone.
    Need some help cause I guess it’ possible with this code but I don’t knkow how to modify it.

    This code is for “search” and I would like to get 2 columns for the category ID 77
    Thank you

    add_filter( 'generate_blog_get_column_count','tu_search_column_count' );
    function tu_search_column_count( $count ) {
        if ( is_search() ) {
            return 33;
        }
    
        return $count;
    }
    
    #2538973
    David
    Staff
    Customer Support

    Hi there,

    try this:

    add_filter( 'generate_blog_get_column_count','tu_search_column_count' );
    function tu_search_column_count( $count ) {
        if ( is_category( '9' ) ) {
            return 50;
        }
    
        return $count;
    }

    change the 9 to your category ID

    #2538988
    jmarc

    Works perfect David !!!
    Thank’s a lot !

    Is the a way to modify the “h2 .entry-title” now on those two columns only (it’s really big on mobile !!!)
    Maybe using another code ?

    JMarc

    #2538994
    jmarc

    Never mind I found it

    .category-blog h2 {
    font-size:22px;
    }

    Thank you
    JMArc

    #2539388
    jmarc

    Resolved

    #2539597
    David
    Staff
    Customer Support

    Glad to hear that!

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