I am trying to connect a filepath to my wordpress page. The filepath I am trying to connect to should be:
'/wp-content/themes/bb-theme-child/php/Hello.php'
Hello.php is:
echo "Hello World"
Here is my code that i have written:
/* SHORTCODE TO HAVE FILES */
add_shortcode('data1', function($atts) {
$atts = 'Some post: ' . include dirname(__Hello.php__) . '/wp-content/themes/bb-theme-child/php/Hello.php';
echo $atts;
});
Whats strange is the output:
echo "Hello!";Some post: 1
Im not sure what Some post: 1 is, nor the reason why Some post comes AFTER Hello.php