[Resolved] Change masonry block size/content?

Home Forums Support [Resolved] Change masonry block size/content?

Home Forums Support Change masonry block size/content?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #91045
    M

    Hey there! First of all, I’m using the Freelancer theme with all of the GP Premium add-ons switched on. My site is: http://www.songsthatdepressthefuckoutofme.com

    What I would like to do is change the size/content of the masonry blocks that are displaying on my site’s homepage. So, if you look at the site, you can see that the newest post is displayed large and in full. All other posts are shown in small masonry blocks, which is great. However, I’d like to make it so that each small masonry block only displays the title, date, and then the 2 side by side images (an album cover, and quotation). As it stands now, it displays a lot more of the content from the post within the small blocks (making them very long).

    Is there any way for me to achieve this? My knowledge of HTML and CSS is limited, but any help will be greatly appreciated!

    #91071
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Give this CSS a try:

    .masonry-brick.width2 .entry-meta {
          display: none;
    }

    Then, you’ll need to set the “More tag” where you want the excerpt to cut off (after the side by side images): http://generatepress.com/forums/topic/change-masonry-block-sizecontent/

    Hope this helps ๐Ÿ™‚

    #91363
    M

    Thanks so much, Tom! This definitely helped. Using the CSS you provided and the “More Tag,” I’ve been able to set where I want the excerpt to cut off.

    However, now I’m left with an ellipses, and a bunch of padding at the bottom of each tile (maybe the top, too?). Is there some way for me to remove both of these things?

    #91441
    Tom
    Lead Developer
    Lead Developer

    To remove the ellipses, you’ll need to add this function:

    if ( ! function_exists( 'generate_remove_excerpt_more' ) ) :
    	/**
    	 * Removes the read more link
    	 */
    	add_filter( 'excerpt_more', 'generate_remove_excerpt_more', 100 );
    	function generate_remove_excerpt_more( $more ) {
    		return '';
    	}
    endif;

    To add functions, you can use your child theme’s functions.php file, or a plugin like this: https://wordpress.org/plugins/code-snippets/

    #91492
    M

    Thanks for your help, Tom! Unfortunately, I tried adding the function using the code-snippets plugin, as well as editing the functions.php file in the freelancer theme, but neither seems to have any effect. The ellipses and a large space still remains. Hmmm.

    Not sure what I’m doing wrong.

    #91749
    Tom
    Lead Developer
    Lead Developer

    Ah ok, maybe you’re using the More tag.

    Use this entire block to disable the read more and ellipses in excerpts and while using the more tag:

    if ( ! function_exists( 'generate_remove_excerpt_more' ) ) :
    	/**
    	 * Removes the read more link from excerpts
    	 */
    	add_filter( 'excerpt_more', 'generate_remove_excerpt_more', 100 );
    	function generate_remove_excerpt_more( $more ) {
    		return '';
    	}
    endif;
    
    if ( ! function_exists( 'generate_remove_content_more' ) ) :
    	/**
    	 * Removes the read more tag from content with more tag
    	 */
    	add_filter( 'the_content_more_link', 'generate_remove_content_more', 100 );
    	function generate_remove_content_more( $more ) {
    		return '';
    	}
    endif;
    #91806
    M

    That did it! You’re a genius, Tom. Thank you so much for your help.

    #91908
    Tom
    Lead Developer
    Lead Developer

    Awesome, happy to help! ๐Ÿ™‚

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