The problem is that you are using file_get_contents()
which only gets the content of the file (hence the name)
if you need to render(evaluate and process the php file) then just use include()
.
But also if your cup_bc_layout.php
file echo’s out something then you should put the include inside an object buffer and then return the value to make sure the shortcode works properly.
So try this:
function cup_bc_shortcode($atts,$content=NULL){
ob_start();
include('/html/cup_bc_layout.php');
$return_val = ob_get_contents();
ob_end_clean();
return $return_val;
}
add_shortcode('budgetcalc', 'cup_bc_shortcode');