• Is there a way to change the Excerpt so that I counts characters and not how many words?

    The design I’m using is very strict, and using the excerpt as counting words pushes other elements out of the way. If i can count characters, everything will stay uniformed.

    What do I need to do so that it counts characters instead of words?

Viewing 9 replies - 1 through 9 (of 9 total)
  • and using the excerpt as counting words pushes other elements out of the way

    With a proper CSS setup, this will not occur.

    Thread Starter Dani-Girl

    (@dani-girl)

    Unfortunately, we are using a template that will automatically change the positioning of elements as you re-size down, to accommodate for the various screens that will a user may be viewing with. Whether you’re on a 1080 screen or looking at it through your mobile device (through css detecting screen size and replacing elements).

    The word count isn’t working for this layout, but I found that limiting to character count works fine.

    Hire a CSS person, your statement is not correct.

    Thread Starter Dani-Girl

    (@dani-girl)

    Thanks for the non-help. I just need a code to count characters, not snide remarks alright?

    Thread Starter Dani-Girl

    (@dani-girl)

    Nice link. I don’t see where it covers how to modify the get_the_excerpt() function.

    I was able to get this much of a function coded, but it counts the characters in a shortcode and in HTML entities and leaves uncompleted words.

    How can I stop it from counting the characters in HTML and shortcodes, and finish a word?

    function get_my_excerpt(){
    $excerpt = get_the_content();
    $excerpt = substr($excerpt, 0, 200);
    $excerpt = $excerpt.'... ';
    return $excerpt;
    Thread Starter Dani-Girl

    (@dani-girl)

    Tried Advanced Excerpt plugin and its actually broken. Doesn’t work no matter what I do in the settings. Author of the plugin hasn’t answered questions concerning it.

    I am impressed with how fast you can troubleshoot an issue!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Excerpt – Change to Characters not Words’ is closed to new replies.