[Resolved] Remove three dots (…) from masonry

Home Forums Support [Resolved] Remove three dots (…) from masonry

Home Forums Support Remove three dots (…) from masonry

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #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

    #46919
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Adding the following CSS should fix that:

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

    Let me know πŸ™‚

    #46924
    Evandro Arruda

    Perfect Tom!

    Thank you so much!!

    #46926
    Tom
    Lead Developer
    Lead Developer

    You’re very welcome!

    Great site by the way – let me know if you’d like to featured in our showcase πŸ™‚

    #91299
    Carlos Paramio

    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');
    #91437
    Tom
    Lead Developer
    Lead Developer

    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;
    #91745
    Carlos 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)

    #91765
    Tom
    Lead Developer
    Lead Developer

    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>';
    }
    #91778
    Carlos 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

    #91779
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #91781
    Carlos Paramio

    oops

    #91804
    Carlos Paramio

    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.

    #91907
    Tom
    Lead Developer
    Lead Developer

    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.

    #91967
    Carlos Paramio

    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

    #92230
    Tom
    Lead Developer
    Lead Developer

    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?

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