- This topic has 16 replies, 3 voices, and was last updated 8 years, 5 months ago by
Tom.
-
AuthorPosts
-
November 17, 2014 at 10:24 am #46917
Evandro Arruda
Hi,
I am building a photography website, and I am focusing on the images in the homepage. To do this, I have removed the text, excerpt, categories, etc. I just didn’t managed how to remove the three dots below the featured image. Is that possible?
Here’s the website I am talking about: http://evandroarruda.com/
Thanks
November 17, 2014 at 10:41 am #46919Tom
Lead DeveloperLead DeveloperHi there,
Adding the following CSS should fix that:
.masonry-brick .entry-summary { display: none; }
Let me know π
November 17, 2014 at 10:55 am #46924Evandro Arruda
Perfect Tom!
Thank you so much!!
November 17, 2014 at 10:58 am #46926Tom
Lead DeveloperLead DeveloperYou’re very welcome!
Great site by the way – let me know if you’d like to featured in our showcase π
March 25, 2015 at 9:15 am #91299Carlos Paramio
Hi Tom
I’ve added that CSS but it hides everythingWhat about to remove only the 3 dots?
I have tried with this snippet without luck
function custom_excerpt( $more ) { return 'HERE GOES THE REPLACEMENT FOR THE 3 DOTS'; } add_filter('excerpt_more', 'custom_excerpt');
March 25, 2015 at 4:52 pm #91437Tom
Lead DeveloperLead DeveloperGive this a shot:
if ( ! function_exists( 'generate_custom_excerpt_more' ) ) : /** * Prints the read more HTML */ add_filter( 'excerpt_more', 'generate_custom_excerpt_more', 100 ); function generate_custom_excerpt_more( $more ) { $generate_settings = wp_parse_args( get_option( 'generate_blog_settings', array() ), generate_blog_get_defaults() ); return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . $generate_settings['read_more'] . '</a>'; } endif;
March 26, 2015 at 9:03 am #91745Carlos Paramio
I must have done something wrong cause it doesn’t change anything
(I have deleted my former attempt in Code Snipets, then added that PHP, saved and activated it)March 26, 2015 at 10:37 am #91765Tom
Lead DeveloperLead DeveloperTry this instead:
add_action( 'after_setup_theme','tu_remove_read_more' ); function tu_remove_read_more() { remove_filter( 'excerpt_more', 'generate_blog_excerpt_more', 99 ); remove_filter( 'the_content_more_link', 'generate_blog_content_more', 99 ); } add_filter( 'excerpt_more', 'tu_blog_excerpt_more', 99 ); function tu_blog_excerpt_more( $more ) { if ( ! function_exists( 'generate_blog_get_defaults' ) ) return; $generate_settings = wp_parse_args( get_option( 'generate_blog_settings', array() ), generate_blog_get_defaults() ); // If empty, return if ( '' == $generate_settings['read_more'] ) return; return '... <a title="' . esc_attr( get_the_title() ) . '" class="read-more" href="'. esc_url( get_permalink( get_the_ID() ) ) . '">' . $generate_settings['read_more'] . '</a>'; } add_filter( 'the_content_more_link', 'tu_blog_content_more', 99 ); function generate_blog_content_more( $more ) { if ( ! function_exists( 'generate_blog_get_defaults' ) ) return; $generate_settings = wp_parse_args( get_option( 'generate_blog_settings', array() ), generate_blog_get_defaults() ); // If empty, return if ( '' == $generate_settings['read_more'] ) return; $more_jump = apply_filters( 'generate_more_jump','#more-' . get_the_ID() ); return '<p class="read-more-container"><a class="read-more content-read-more" href="'. get_permalink( get_the_ID() ) . $more_jump . '">' . $generate_settings['read_more'] . '</a></p>'; }
March 26, 2015 at 11:03 am #91778Carlos Paramio
You got it!
Although it creates a line between the end of the excerpt and the Read More link, any way to delete that space?Thank you sir
March 26, 2015 at 11:07 am #91779Tom
Lead DeveloperLead DeveloperYou’re welcome π
March 26, 2015 at 11:10 am #91781Carlos Paramio
oops
March 26, 2015 at 12:51 pm #91804Carlos Paramio
Sorry
Already deleted the<p>
tag in the secondif
and now the Read more item is closer to the paragraph but still a line under it.March 26, 2015 at 11:50 pm #91907Tom
Lead DeveloperLead DeveloperHmm, since you’re showing the full post/using the more tag, WordPress will automatically add a paragraph to the text before the read more. Unfortunately there’s no way around it unless you choose to show the excerpt or remove the more tags.
March 27, 2015 at 1:47 am #91967Carlos Paramio
I see… thanks for the explanation.
I’m still trying to understand how WordPress worksLet me explain: my boss always writes an intro in each post that must be used as the excerpt, and as those intros finish with a dot it looks weird when the 3 dots are after the intro’s dot.
So, based in your experience, which is the best way to get that kind of excerpt and the Read more tag after it?Thank you very much
March 27, 2015 at 9:16 am #92230Tom
Lead DeveloperLead DeveloperHmm, have you tried setting the blog content to show the excerpt instead of the full post in the Customizer?
Maybe give the Excerpt metabox a try as well – if you don’t see it while writing the post, click on “Screen Options” at the top right, and check the “Excerpt” checkbox.
Just so I understand, the issue here is that the read more link is on a new line, instead of being right up against the last sentence, correct?
-
AuthorPosts
- You must be logged in to reply to this topic.