Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1152795
    Paul R
    Moderator

    In that case, 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:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1153653
    necxelos
    Participant

    Sorry can’t do, because I still work on localhost (not live yet). I included this fact in my initial post here 🙂

    Please refer directly to post #1151028.

    All I need is … (triple dot) at the end of excerpt (in the same line, without space, just as it was in default excerpt).

    P.S. Please don’t mind the [ . . . ] part in my code, that was just my failed experiment to test where dots will land.

    Thanks in advance 🙂

    #1154410
    Lely
    Moderator

    Hi There,

    Thank you for the clarification. Please update this line of code:
    $excerpt_end = '<p class="read_more_alternative"> [&emsp;. . .&emsp;] </p> <p class="read_more_text"> To read more, click the Featured Image or Post Title </p>';

    To this:
    $excerpt_end = '<span class="read_more_alternative"> [&emsp;. . .&emsp;] </span> <p class="read_more_text"> To read more, click the Featured Image or Post Title </p>';

    Paragraph tag is a block element that’s why it is displaying as new line and not right after the excerpt end. Using span tag instead will achieve what you want. See attached screenshot when I test the code.

    Hope this helps.

    #1154433
    necxelos
    Participant

    Sadly Your change didn’t do anything at all, but out of a wild guess (or maybe I’m starting to finally learn something from You guys, who knows :P) I managed to make such change (to my code from post #1151028):

    if ($count >= $excerpt_word_count && preg_match('/[\,\;\?\.\!]\s*$/uS', $token)) {
                     // Limit reached, continue until , ; ? . or ! occur at the end
                            $excerptOutput .= trim($token);
    
    			$excerptOutput .= '...'; // THIS IS MY NEW LINE !!!
    
                            break;
                        }

    …does the job. Just tell me if this is correct and won’t explode 🙂

    Thanks.

    #1154604
    Darshana
    Moderator

    Glad you were able to figure it out. Your solution is fine and does the job.

    Cheers!

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