shortcode with do_shortcode() within widget
-
On the page are two widgets: Aktuelles für diese Kita
The first one uses the shortcode [su_posts …. It shows a link to a post.
Th second one (dyn SC) generates the same shortcode with this code:
add_shortcode( 'kitaposts', function ($attr) { $kita_sw = get_post_meta( get_the_ID(), 'kita_ID', true ); $shc = '[su_posts template="templates/list-loop.php" posts_per_page="10" taxonomy="post_tag" tax_term="' . $kita_sw . '"]'; echo 'Shortcode: ' . $shc . '<br>'; do_shortcode($shc); } );
This gives no result. Where do I make an error????
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘shortcode with do_shortcode() within widget’ is closed to new replies.