[Support request] Blog add-on: different number of columns on first page

Home Forums Support [Support request] Blog add-on: different number of columns on first page

Home Forums Support Blog add-on: different number of columns on first page

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #825423
    Marco

    Hello
    I’d like to have two columns of blog posts on the 1st page and the sidebar and then on the following pages I’d like to have no sidebar but 3 columns of blog posts.

    how can I achieve that?

    any input is very much appreciated.

    #825780
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Give this a shot:

    add_filter( 'generate_sidebar_layout', function( $layout ) {
        if ( is_paged() ) {
            return 'no-sidebar';
        }
    
        return $layout;
    } );
    
    add_filter( 'generate_blog_get_column_count', function( $count ) {
        if ( is_paged() ) {
            return '33';
        }
    
        return $count;
    } );

    Let me know ๐Ÿ™‚

    #825982
    Marco

    Thanks Tom – those filters seem to work.

    What I’m struggling with however is achieving the same height for the column content – I’m using the read more link as a button so it looks kind of strange not having them on the same line within a row.

    I’m using the following code so far:

    .generate-columns-container,
    .generate-columns {
    	.inside-article {
    		
    		display: flex;
    		flex-direction: column;
    		
    		.entry-summary {
    			display: flex;
    			flex-direction: column;
    			flex-grow: 1;
    		}
    	}
    }
    
    .read-more-container {
        margin-top: auto;
    }
    

    what am I missing??

    #826091
    Tom
    Lead Developer
    Lead Developer

    Any chance you can link me to the page?

    #826095
    Marco

    Hello Tom

    I’m currently on localhost – while playing with the css in order to get to equal height columns I think I’ve figured out what the issue is – the entry footer doesn’t always have the same height since the number of tags are different for the posts – some tags go over two or even more lines – if I hide the .tags-links, the above css seems to work – I don’t really see a way around this, do you??

    #826658
    Tom
    Lead Developer
    Lead Developer

    Hmm, it’s hard to tell without seeing it, unfortunately. Can you show me a screenshot?

    #826879
    Marco

    Hello Tom

    Please find the screenshot here: Screenshot - Column height or : Open image

    #827024
    Tom
    Lead Developer
    Lead Developer

    Hmm that’s strange, I think I’d have to see the issue to fully debug it, unfortunately. Any chance you can throw it up on a temporary live server?

    #827173
    Marco

    I might be able to put it up on a live server or can give you access locally

    #827525
    Tom
    Lead Developer
    Lead Developer

    Awesome – feel free to send details through our contact form if you’d like: https://generatepress.com/contact

    Just be sure to mention this topic ๐Ÿ™‚

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