Tagged: x
-
AuthorPosts
-
March 12, 2017 at 5:47 pm #1404064
Katharina OParticipantSo far all did work:
I entered following code in the .php and it works perfectly – Thanks.function custom_excerpt($text) { // custom ‘read more’ link
if (strpos($text, ‘[…]’)) {
$excerpt = strip_tags(str_replace(‘[…]’, ‘… weiter…‘, $text), ““);
} else {
$excerpt = ‘<p>’ . $text . ‘weiter…</p>’;
}
return $excerpt;
}
add_filter(‘the_excerpt’, ‘custom_excerpt’);So that read more is showing if there is a custom excerpt or not. YEAY.
Plus I got rid of the default “read more”.
But now I would like to style the new read more (bold and underlined) and I don’t know which is the code do link it to..get_permalink {
font-weight: bold;
text-decoration: underline;
}that didn’t do the trick. 🙁 Any suggestions?
March 12, 2017 at 11:18 pm #1404354
RupokMemberHi there,
Thanks for writing in! Yes it’s possible but it should be bold and underlined by default. If you want to add any other styling then you can add this under Custom > CSS in the Customizer.
.more-link { font-weight: bolder; text-decoration: underline; }If you are referring anything else, kindly provide your URL and point us that.
Cheers!
March 13, 2017 at 9:35 am #1404917
Katharina OParticipantHey, thanks but that doesn’t work since I hide the default “read more”
After changing the .php as you suggested to allow “read more” for individual excerpts I had two “read more” in some posts. So I put this code (as writting in this forum) into the CSS
.more-link {
display: none;
}So now styling a piece of code that I don’t display is obviously not working 🙂
And the new “read more” is not bold and underlined by default.
March 13, 2017 at 11:32 am #1405093
RupokMemberHi there,
In that case provide your URL and point us which read more you are referring.
Thanks!
March 13, 2017 at 1:30 pm #1405233
Katharina OParticipantThis reply has been marked as private.March 13, 2017 at 5:02 pm #1405550
Nabeel AModeratorHi again,
Thank you for providing the URL. Try adding the following code in your Customizer:
.excerpt a { font-weight: bold !important; text-decoration: underline !important; }Let us know how this goes!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1404064 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
