PHP Not Working on Page

Hi,

I have a PHP Plugin that I’ve using and placing a short code on the page, and this should GET the email address from the URL.

northshorepro1.staging.wpengine.com/membership-step-2/

This works on other sites with a different theme, but doesn’t seem to be working with ThemeX, is there any reason why this shouldn’t be working?

This is being done on the staging site, would there be any difference with it not being a live site?

Thanks, Mike

Hi there,

You can not add PHP code inside the Cornerstone. You need to use shortcodes as they are intended such as:

Not related to PHP error you mentioned but I see 2 Javascript errors. It seems that you added the scripts tags (<script) inside the customizer which it is wrong.

you should add the code without the script tag as the script tag is already added by the theme so instead of:

<script>
fbq('track', 'CompleteRegistration', {
value: 25.00,
currency: 'USD'
});
</script>

add:

fbq('track', 'CompleteRegistration', {
value: 25.00,
currency: 'USD'
});

Also you should not add the <script async src="https://assets.convertflow.com/scripts/480.js"></script> to the customizer.

To add a script like that you need to add a child theme. Then add the code below to functions.php:

add_action( 'wp_head', 'x_print_custom_scripts' );
function x_print_custom_scripts(){
  ?>
 <script async src="https://assets.convertflow.com/scripts/480.js"></script>
  <?php
}

Hi,

Just to confirm I’m using a plugin called ShoreCode PHP, and I’ve put a web form into that plugin, and part of that form as a GET command, to get the email address from the URL. I’ve then placed the short code that that plugin give into a a RAW Code Snippet in Cornerstone.

It is displaying the form ok, it’s just not getting the email address and populating the email field. That’s what is happening on this page. northshorepro1.staging.wpengine.com/membership-step-2/

Are there any functions or recommended plugins that operate with Cornerstone, so that I can prepopulate a field in a form form the contents or the url?

Thanks, Mike

Hi there,

The problem is with your form and it’s not related to the cornerstone. It could only fail in the cornerstone builder since the form is not directly integrated, but you form should work in the front where there is no cornerstone. If that fails in the front then that means the form is faulty. You should try other forms like gravity forms, contact forms, and etc.

Thanks!