• Resolved agenturmai

    (@agenturmai)


    Hi
    the variable %%excerpt%% is for taking the wordpress excerpt

    But is there a variable for “take the first paragraph” or “the first n words” from the normal content?

    Kind regards
    Alex

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Alex,

    Yoast SEO has a %%excerpt_only%% snippet variable to just get the data from a page’s excerpt field, but if you use the %%excerpt%% variable, it should be the correct one to use to get the first words from the content.

    To help us troubleshoot, we have a few questions:

    1. Can you give us an example of what you’re seeing and what you expected to see instead?

    2. Do you have text in the excerpt field for the post where this is happening? If so, this will display instead. Does removing the excerpt text, solve the problem?

    You can check how WordPress generates the excerpt in the WordPress reference for the_excerpt.

    Thread Starter agenturmai

    (@agenturmai)

    Hi Priscilla,
    thanx for helping.

    ISSUE:
    I added in the Yoast-settings for metadescription for pages the %%excerpt%% variable.
    Result: No description
    Example:
    https://kuenstleragentur-mai.de/buehnentechnik/
    I expect that there is a metadescription using the first words from the normal content.
    The page does not have any content in the excerpt field.

    I also used the the %%excerpt%% variable for portfolio items.
    Result: It works (it takes the content from the excerpt field)
    https://kuenstleragentur-mai.de/kuenstler-vermittlung/tanz-den-kontrabass/

    kind regards
    alex

    Plugin Support devnihil

    (@devnihil)

    @agenturmai Thanks for your reply.

    If you are using the %%excerpt%% variable and no information is being returned, a possible cause for this might be that you are using a page builder to create content.

    Can you let us know if you are using a page builder plugin such as Visual Composer, Site Origin, Beaver Builder etc to create your page’s content? The SEO and readability analysis features can sometimes not work correctly if you are using some kind of visual page builder, as they can cause the page’s content to not be accessible to the plugin due to it being created outside the functions of the standard WordPress page editor.

    Thread Starter agenturmai

    (@agenturmai)

    The heme is Enfold and it has a page-builder integrated: Advanced Layout Builder

    Hi,

    This seems like a bug as Yoast is able to scan the text, so we would expect Yoast to also output the excerpt correctly. We have opened up a bug report with our developers. The only workaround is to manually add in the data into the meta description field.

    In the meantime, we suggest signing up for our newsletter as that is where we will announce product changes and updates. You may sign-up for it here https://yoast.com/ by scrolling towards the bottom to complete the sign-up field.

    Thread Starter agenturmai

    (@agenturmai)

    Hi,
    Its a bit confusing that everytime someone else is answering.
    This might lead to a situation that we got contradictionary answers.

    Priscilla said:Its normal that Yoast cant acess the content from page builder elements.
    You say: Its a bug

    1: Whats true?
    2: Bug on which end? Yoast?
    3: Enfold & Yoast are not new on the market. How come that you didnt see that issue before?
    4: Enfold & Yoast are supposed to work seemingless. Doesnt seems so, right?

    kind regards
    alex

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    We are sorry for all the confusion. We work as a team and when someone from the team is available, they’d handle your case by reading the whole story first.

    That said, the issue you are currently experiencing is a known bug and we have already submitted a bug report to our development team. We have also heard back from our development team with the following findings:

    When using the Enfold theme with the Advanced Layout Builder, the shortcodes are being added when using the %%excerpt%% template variable. Shortcodes get stripped when automatically generating meta description, hence the meta description remains empty on the page.

    So, the best solution would be to write the meta description manually when using the Enfold them with Advanced Layout Builder. Alternatively, you can switch to a different page builder plugin.

    We hope that explains your query!

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

    Thread Starter agenturmai

    (@agenturmai)

    Sorry, but as long as you didnt fix it its not resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘“excerpt” …using the first n words from content’ is closed to new replies.