Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Yoast Name variable #1046

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

claudiulodro
Copy link
Contributor

Description

This PR adds support for the %%name%% variable that Yoast uses for meta descriptions. Currently this variable will display the name of the user that created a post instead of the guest/multiple authors.

Ref:

Deploy Notes

Should be safe. No compatibility implications.

Steps to Test

  1. Before applying this PR, have a site with CAP and Yoast SEO active.
  2. At the bottom of a post with a guest author, in the Yoast meta area, add the Name variable in the SEO title field. Observe in the preview it shows the non-guest-author. In the frontend source code there should be a <title> tag in the head that has the same wording as that preview.
Screenshot 2024-05-14 at 10 19 05 AM
  1. Apply this PR. Refresh the edit and the frontend pages. The preview and <title> tag should accurately reflect the guest author.
Screenshot 2024-05-14 at 10 21 34 AM
  1. Add more than one author. Refresh the edit and the frontend pages. The preview and <title> tag should accurately reflect the authors.

Copy link
Member

@adekbadek adekbadek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described!

@claudiulodro claudiulodro merged commit 878034a into develop May 16, 2024
9 checks passed
@claudiulodro claudiulodro deleted the add/yoast-replacement branch May 16, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants