• Resolved DylanR

    (@dylanr)


    Hi all,

    So I recently installed a nice Google font to use on my WordPress site. Everything was perfect and the site looked nice, until I noticed a couple of things.

    WordPress seems to automatically change quotes into smart quotes (not a problem, I stopped that happening) and 3 consecutive periods into an ellipsis.

    This bit causes a problem. My Google Font doesn’t contain an ellipsis, so whenever this happens, it breaks the font and throws it back into Times New Roman

    Bottom line and tl;dr:

    How do I stop WordPress from turning 3 periods into an ellipsis?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Phil

    (@owendevelopment)

    You can change the ‘read more’ ellipsis […] into anything you want.

    Add this to you themes functions.php file:

    function new_excerpt_more($more) {
           global $post;
    	return '<a class="morelink" href="'. get_permalink($post->ID) . '">Read more</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    You can change ‘Read more’ to anything you want.

    Thread Starter DylanR

    (@dylanr)

    Hi Phil,

    Thanks for the reply,

    Will this only work for the ‘read more’ ellipsis?

    My problem is that any time I put 3 consecutive periods into a post, WordPress converts this into an ellipsis character, which breaks my font

    Phil

    (@owendevelopment)

    Hmm. Maybe try adding in a filter:

    function ellipsis_replace($content) {
      return str_replace('#8230;','...',$content);
    }
    add_filter('the_content','ellipsis_replace', 99);
    Phil

    (@owendevelopment)

    Did it work?

    Thread Starter DylanR

    (@dylanr)

    Hey,

    Sorry about that, just got a chance to test it out

    It seems to allow the regular ellipsis now, but it adds an & just before

    Phil

    (@owendevelopment)

    Put a & before the #8230; (just in front of the #)

    Thread Starter DylanR

    (@dylanr)

    That’s done it

    Ta muchly, Phil
    I would never have figured this one out on my own!

    Phil

    (@owendevelopment)

    No probs 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘A problem with ellipsis: The Google Font story’ is closed to new replies.