Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hesham Zebida

    (@hishaman)

    Hi Sebastian,

    I know what you mean. But, this was limited within the plugin to comply with Google guidelines for schema:Article.

    The headline of the article. Headlines should not exceed 110 characters. See more details here!

    I’ve tested it again now though, I got no error when headline exceeds 110 characters! So, I went ahead and modified this in the plugin.

    I will release the update soon. Please, look for version 1.7.8.5 and update the plugin to get this fix.

    Plugin Author Hesham Zebida

    (@hishaman)

    I was mistaken! I’ve tested again and see an error. It says:

    (String length of headline must be in range [0, 110])

    This means all sites that has headlines longer then this range will get an error when testing schema.org markup.

    I think I will revert it back, and then you can use a filter to decide title length. Here is an example code:

    add_filter('schema_wp_truncate_to_word_limit', 'truncating_headlines_chars_limit_5655665256');
    /**
     * Schema Plugin: Modify Truncated Headlines limit 
     * 
     * Schema filter truncated headline string limit to anything else than 110 characters 
     *
     * @since 1.0
     */
    function truncating_headlines_chars_limit_5655665256( $limit ) {
        
        $limit  = 110; // number of characters
                 
        return $limit;
    }

    This function can be placed in your theme’s functions.php file. Set the limit number from 110 to a higher number.

    Here is also a link to a gist to grab the code.

    • This reply was modified 3 years, 9 months ago by Hesham Zebida.
    Thread Starter wpsebastianc

    (@wpsebastianc)

    Hi Hesham,

    Thanks for the response.

    May be, the title length is not the problem. Although the title length is short, the last word doesn′t appear. For example:

    In this post https://eleconomista.com.ar/2021-02-la-ultima-deflacion-de-china/ the title is “La ultima deflacion de China” . So, the title length is 28 characters.

    Do you know where the issue is?

    Thread Starter wpsebastianc

    (@wpsebastianc)

    Hi Hesham,

    Do you have any answer o solution for my issue? If we can’t solve this, i will have to change the plugin for other. I don’t want this, but i have no alternative.

    Plugin Author Hesham Zebida

    (@hishaman)

    Ok, so I’ve taken another look and it seems that the function responsible for truncating headline has an issue!

    I’ve updated the whole function and pushed the 1.7.8.7 update.

    Please, update the plugin and test it out.

    P.S. After updating the plugin, go to the plugin settings and click on the “Save Changes” once, then flush site cache if you are using any caching plugin (This to make sure changes has taken place).

    Thread Starter wpsebastianc

    (@wpsebastianc)

    Hesham,

    Thank you very much.

    The issue was resolved with this update.

    Cheers

    Plugin Author Hesham Zebida

    (@hishaman)

    Glad to hear that.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Rich Results issue’ is closed to new replies.