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

Shortcode params #1248

Open
douglasscriptore opened this issue Jan 27, 2022 · 1 comment
Open

Shortcode params #1248

douglasscriptore opened this issue Jan 27, 2022 · 1 comment

Comments

@douglasscriptore
Copy link

How do I get attributes from the shortcode within React?

Example: [my-shot-code view="main"]

@Rados51
Copy link

Rados51 commented Feb 5, 2022

@douglasscriptore Shortcodes are rendered via PHP as regular DOM elements inside WP. You will have to assign those attributes to DOM element, and then you can get them with document.querySelector.

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

No branches or pull requests

2 participants