Forums

Condition meta description help needed (1 post)

  1. paa1605
    Member
    Posted 1 year ago #

    Hi guys,

    Im trying to add a conditional statement in my header section for the meta description so that google doesn't just show the default description for each page of my site in the serps. So far i've managed to get it working using the following code but as i don't write an excerpt the single posts just use the default description.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Can anyone help in telling me how i can amend this code so that google uses the first few sentences of the blog post as the meta description for single page results?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.