• Resolved Aureola

    (@aureola)


    Hi!
    I have a very strange problem that I just found out the reason to! (However I do not have a solution, that’s why I post this)

    When i write a blog post (the normal way, in the admin-panel) and write these characters “[…]” in my text – then they are interpreted by functions.php as they should, transforming into a magnificent Read More-link. However – the php-generated “[…]” that follows automatically where the the_excerpt chops off the text seems to be a totally different animal. It does not get picked up by the function in functions.php.
    (My functions.php-file)

    function excerpt_ellipse($text) {
       return str_replace(' [...]', ' <a href="'.get_permalink().'"><br />Read more</a>', $text); }
    add_filter('the_excerpt', 'excerpt_ellipse');

    Then, I tried to copy the generated ellipse characters […] from the web page in the browser; turns out that the three dots in the middle are interpreted as ONE character – so I tried to copy this whole character together with the []’s from the web page, and pasted it into functions.php, replacing the original […]. (I hope you follow me here, this was quite difficult to explain!) But unfortunately it doesn’t work either. I also tried to copy them(it) to Notepad, as to make sure no formatting comes along with it, and Notepad also treat these tree dots as a single character.

    Anyone had the same problem? And could help me with the solution..?

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    What theme are you using? Where did you download it from?

    Thread Starter Aureola

    (@aureola)

    I’m creating my own theme. Started from a stripped twenty-twelve, and have not added so much since then, my php-files are few, short and simple. If you need to see them I’ll be happy to show you. The entire site can be viewed at https://www.ct-equestrian.com/wp/wordpress; there you can see the problem in the sidebar, under the News title.

    Thread Starter Aureola

    (@aureola)

    Ok so I got help from a friend instead. He told me to try with the html special character '[&hellip]' instead of '[...]' in the function and now it works! I thought I might as well write this into this thread so that others with this problem might get help too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP-generated three dots in […] are one character! ??’ is closed to new replies.