[Resolved] Styling Read on Link

Home Forums Support Styling Read on Link

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #554693
    Robert

    I’d like to style the link and hover colors for my excerpt’s “Read on” link independent of the Content colors in Customizer. Basically, I’d like to use brown for the link color and blue for the hover. In the post content, I have that reversed because the brown recedes within the body of text.

    I’m currently using the following snippet to create the “Read on” link following my post excerpts on the front page:

    //* Changing excerpt more - only works where excerpt IS hand-crafted
      
    function manual_excerpt_more( $excerpt ) {
    	$excerpt_more = '';
    	if( has_excerpt() ) {
        	$excerpt_more = '&nbsp;<a href="' . get_permalink() . '" rel="nofollow"><strong><p>Read on &rarr;</p></strong></a>';
    	}
    	return $excerpt . $excerpt_more;
    }
    add_filter( 'get_the_excerpt', 'manual_excerpt_more' );

    As always, your help is greatly appreciated.

    GeneratePress 2.0.2
    GP Premium 1.6.2
    #554932
    Leo
    Staff
    Customer Support

    Hi there,

    Try this CSS:

    .entry-summary a {
        color: #000;
    }
    .entry-summary a:hover {
        color: #fff;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #554955
    Robert

    Perfect! Thank you.

    #555289
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.