Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1404064
    Katharina O
    Participant

    So 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?

    #1404354
    Rupok
    Member

    Hi 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!

    #1404917
    Katharina O
    Participant

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

    #1405093
    Rupok
    Member

    Hi there,

    In that case provide your URL and point us which read more you are referring.

    Thanks!

    #1405233
    Katharina O
    Participant
    This reply has been marked as private.
    #1405550
    Nabeel A
    Moderator

    Hi 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!

  • <script> jQuery(function($){ $("#no-reply-1404064 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>