Navigation überspringen

[Gelöst] Shortcode parameters inside php

This support ticket is created vor 4 Jahren, 10 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Dieses Thema enthält 1 Antwort, hat 1 Stimme.

Zuletzt aktualisiert von Ido Angel vor 4 Jahren, 10 Monaten.

Author
Artikel
#1580847

hey
I created a woocommerce tab with content in my theme's functions.php file.
In the content, I need to pass this shortcode:

[wpv-view name="single-product-tips" producttips="[types field='id-faq'][/types]"]

How would I do that?
I tried:

	$args = array(
    "name" => "product-faq",
    "productfaq" => echo do_shortcode("[types field='id-faq'][/types]")
);
echo render_view( $args );
 $faq = "[types field='id-faq'][/types]";
echo do_shortcode('[wpv-view name="product-faq" productfaq="'. $faq . '"]');

none worked of course.
Help appreciated
thanks!

#1580913

got it:

$faq = do_shortcode( '[wpv-post-id]' );
echo do_shortcode('[wpv-view name="product-faq" productfaq="'. $faq . '"]');