Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Approach to set some values programmatically #2092

Open
clivezhg opened this issue Jan 9, 2019 · 0 comments
Open

Approach to set some values programmatically #2092

clivezhg opened this issue Jan 9, 2019 · 0 comments
Labels

Comments

@clivezhg
Copy link

clivezhg commented Jan 9, 2019

I'm trying to make a Wordpress plugin support YoastSEO, and I would like to set some values programmatically, but I'm not able to do it.
E.g., to change "Meta description" programmatically, according to my investigation, I suppose the following steps can work:

  1. $("#yoast_wpseo_metadesc").val("Some Value");
  2. window.YoastSEO.app.reloadSnippetText();
    or 2. window.YoastSEO.app.refresh();

Hower, the above doesn't work. It looks that the 'window.YoastSEO.app' doesn't have the 'snippetPreview' member might be the cause.
Could anyone help? Thanks a lot in advance!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants