• Resolved konar

    (@konar)


    Hello everyone,

    I have strange problem, I’m missing letter ‘s’ in excerpt on my site on server (with wp version 4.6.6) and local instalation (with wp version 4.8.1). And only in that place – excerpt.
    https://www.patron.biz.pl/realizacje/

    What can be the problem here?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    That IS very strange.

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    Thread Starter konar

    (@konar)

    Thank You Steven for Your response.
    I did everything You asked to, but nothing have changed. The theme is build over WordPress theme Twenty Thirteen version 1.9 – maybe this will give some clues.

    Moderator Sergey Biryukov

    (@sergeybiryukov)

    WordPress Dev

    I’m missing letter ‘s’ in excerpt on my site

    Where exactly the s letter should be?

    Thread Starter konar

    (@konar)

    Letter “s” is missing only in excerpts, in title it is ok, for example first post (missing “s” is putted in [s]):

    Title: “Centralne instalacje filtrowentylacyjne dla stanowisk spawalniczych”
    Excerpt: “Projektujemy, wykonujemy a na[s]t?pnie do[s]tarczamy i montujemy wielo[s]tanowi[s]kowe in[s]talacje…”

    • This reply was modified 7 years, 3 months ago by konar.

    This sounds as if some function is filtering the_excerpt and has a small mistake in its search/replace code.
    Try to deactivate one plugin at a time and force reload with ctrl-F5 every time.

    Thread Starter konar

    (@konar)

    Try to deactivate one plugin at a time and force reload with ctrl-F5 every time.

    Complitly no effect.

    • This reply was modified 7 years, 3 months ago by konar.

    Interesting thing: These s:es are not just discarded. They are replaced by space character.

    If you enter a manual post excerpt, will it have the same problem?

    You’re using a custom theme. Do you in functions.php have any function filtering the_post or the_excerpt? (Or do you include any other files with functions?

    Thread Starter konar

    (@konar)

    Ok, i found it! ??

    It was error in function made for limited excerpt by character:

    function get_excerpt(){
    $excerpt = get_the_content();
    $excerpt = preg_replace(" ([.*?])",'',$excerpt);
    $excerpt = strip_shortcodes($excerpt);
    $excerpt = strip_tags($excerpt);
    $excerpt = substr($excerpt, 0, 100);
    $excerpt = substr($excerpt, 0, strripos($excerpt, " "));
    $excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt));
    $excerpt = $excerpt.'...';
    return $excerpt;
    }
    

    There was missing “\” in “/\s+/” ??

    Thank everyone for help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Missing letter ‘s’ in excerpt.’ is closed to new replies.