wp-webpack-script
wp-webpack-script copied to clipboard
Shortcode params
How do I get attributes from the shortcode within React?
Example: [my-shot-code view="main"]
@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
.