Tagged: x
-
AuthorPosts
-
September 9, 2016 at 5:05 pm #1168575
RadModeratorHi there,
Does it have manually added text excerpt or full content option is enabled in customizer? Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks!
September 12, 2016 at 6:50 am #1171200
anthony2483ParticipantIf I manually add a text excerpt on the post page the read more link doesn’t display.
If I let the theme create the excerpt as defined in the customizer blog options the read more link works as expected.
September 12, 2016 at 6:55 am #1171206
anthony2483ParticipantThis reply has been marked as private.September 12, 2016 at 8:43 pm #1172350
LelyModeratorHi There,
Thank you for the credentials. Please also try adding the following code on your child theme’s functions.php file:
//Read More Button For Excerpt function themprefix_excerpt_read_more_link($output) { global $post; if( '' != $post->post_excerpt ){ return empty( $output ) ? $output : $output . ' <a href="' . get_permalink($post->ID) . '" class="more-link" title="Read More">Read More</a>'; } } add_filter( 'the_excerpt', 'themprefix_excerpt_read_more_link' );Manual excerpt by default doesn’t add read more. Do let us know how this goes.
Hope this helps.September 13, 2016 at 10:33 am #1173216
anthony2483ParticipantThis did add the read more link to the post with manual excerpt but it also cleared the regular automatic excerpt and read more link. I think the previous code needs to be combined with the new code. I tried to combine it using an else but I couldn’t get it to work quite right.
previous code:
// Read more adjustment function remove_x_excerpt_string() { remove_filter( 'excerpt_more', 'x_excerpt_string' ); } add_filter('after_setup_theme', 'remove_x_excerpt_string'); function new_excerpt_more($more) { global $post; return ' ... <a href="' . get_permalink() . '">' . __( 'Read More', '__x__' ) . '</a>'; } add_filter('excerpt_more', 'new_excerpt_more');September 13, 2016 at 5:24 pm #1173908
JadeModeratorHi there,
Please try this:
// Replaces the excerpt "Read More" text by a link function new_excerpt_more($output) { global $post; return empty( $output ) ? $output : $output . ' <a href="' . get_permalink($post->ID) . '" class="more-link" title="Read More">Read More</a>'; } add_filter('the_excerpt', 'new_excerpt_more');September 14, 2016 at 4:11 pm #1175469
anthony2483ParticipantI can work with this but one last thing I can’t figure out is how to center the read more link.
I’ve tried everything I can think of using the more-link class but maybe I’m doing something wrong.
I thought this would work
.more-link { margin: 0 auto; width: 100%!important; }September 14, 2016 at 10:32 pm #1175979
LelyModeratorHi There,
Please try this CSS instead:
.blog .entry-content.excerpt a { text-align: center; } .blog a.more-link { margin: 0 auto; display: block; }Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1153974 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
