- This topic has 7 replies, 2 voices, and was last updated 8 years, 6 months ago by
Tom.
-
AuthorPosts
-
March 24, 2015 at 6:53 pm #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!
March 24, 2015 at 11:45 pm #91071Tom
Lead DeveloperLead DeveloperHi 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 ๐
March 25, 2015 at 1:23 pm #91363M
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?
March 25, 2015 at 5:37 pm #91441Tom
Lead DeveloperLead DeveloperTo 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/
March 25, 2015 at 10:08 pm #91492M
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.
March 26, 2015 at 9:52 am #91749Tom
Lead DeveloperLead DeveloperAh 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;
March 26, 2015 at 1:08 pm #91806M
That did it! You’re a genius, Tom. Thank you so much for your help.
March 26, 2015 at 11:51 pm #91908Tom
Lead DeveloperLead DeveloperAwesome, happy to help! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.