Hi Stanislav -
This is the code I am using in my single-portfolio.php page:
<?php $ID = types_render_field( "sidebar-select-view", array( "raw" => "true")); $title = get_the_title($ID); do_shortcode('[wpv-post-body view_template="' . $title . '"]'); ?> <?php var_dump($ID); ?>
And from this the browser displays only the variable:
string(4) "4375"
So the above code does not work.
I tried yours and it works!!
Thanks.
Just as an idea — I bet some sort of code generator that would create php or short codes with arguments, etc based on available variables would be very useful for those of us not yet proficient in PHP.
Build that for OTGS and I bet it would be a terrific help for many and offload some of the support requests.
Thanks Stanislav!!
Gary