Add php page

I need to add a php page that I got from my customer. It’s a custom map I need to implement in the new website. How do I do this? I tried to put it under wp-content/themes/pro/ but this does not work

Hi there,

Thanks for writing in.

You can convert your code to a shortcode, and add that shortcode to your page content. Example, add this code to your child theme’s functions.php with your own code.

add_shortcode('my_php_code_1', 'my_php_code_1');

function my_php_code_1( $atts ) {

ob_start();

//Your PHP CODE should be added under this line


return ob_get_clean();

}

Then simply add [my_php_code_1] to your Wordpress editor or builder’s text element. This is just an idea, it still depends on the code you have so please consult it to a developer and forward this a bit of snippet.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.