Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Assigned] php integration of views

$
0
0

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


Viewing all articles
Browse latest Browse all 20145

Trending Articles