Site logo

Archived topic

Remove three dots (...) from masonry

16 replies · Started by Evandro Arruda on November 17, 2014

Viewing posts 1–15 of 17

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

Hi there,

Adding the following CSS should fix that:

.masonry-brick .entry-summary {
      display: none;
}

Let me know :)

Perfect Tom!

Thank you so much!!

You're very welcome!

Great site by the way - let me know if you'd like to featured in our showcase :)

Hi Tom
I've added that CSS but it hides everything

What 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');

Give 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;

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)

Try 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>';
}

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

You're welcome :)

oops

Sorry
Already deleted the <p> tag in the second if and now the Read more item is closer to the paragraph but still a line under it.

Hmm, 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.

I see... thanks for the explanation.
I'm still trying to understand how WordPress works

Let 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

Hmm, 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?

This archived topic is closed to new replies.