Archived topic
Adding PHP/Shortcode to Element Header
3 replies · Started by Craig on January 20, 2019
What is the syntax for doing this? Page Hero does not have the option to execute PHP.
Hi there,
Shortcodes can be added to the Header Element they will automatically execute. But PHP will not.If you have a PHP script that you need then it would need to be added as a shortcode, you can find an example ( or two ) of that here:
https://docs.generatepress.com/article/page-hero-examples/#example-2
Thank you. I resolved this issue by removing the div> wrapped around the shortcode.
Glad you got it resolved.