-
joemoxley
Can we add PHP over here? I want to use PHP shortcode here.
Screenshot: https://prnt.sc/NaXcp44AzZPNThank you
-
Hi there,
no, you can’t run PHP in header element, only in Hooks.
But you can use Shortcodes -
joemoxley
Yes I want to use Shortcode over here. This is how I’m adding the shortcode https://prnt.sc/euhapbUxeL7D and this is how it is reflecting on the frontend https://prnt.sc/2iWKdlnd0Paq
Thank you
-
Remove the PHP.
Just add the shortcode ie.[cornerstone_dynamic_header]
-
joemoxley
then it is going outside the main div. https://prnt.sc/lgJpvsLNwmDg
-
Fernando
Hi Joe,
Can you try adding a Test HTML after the shortcode to test where it goes? Example:
<h2> Test HTML </h2>
-
joemoxley
Test HTML is going inside the DIV but the shortcode is priting outside the div
https://prnt.sc/_2mRTSdZ-qR_
https://prnt.sc/b5qXaXKb9jQa -
Fernando
What’s the code for that shortcode? Is it from a plugin?
Can you try putting the shortcode inside a div? Example:
<div> [cornerstone_dynamic_header] </div>
- You must be logged in to reply to this topic.