Calling widget using shortcode query poblem
-
I am calling a widget using shortcode,
everything is wordking except when I passs a widget option as a query then it only accepts title.Like
[widget name="WP_Widget_Categories"]title=Category&dropdown=1&count=1&hierarchical=1[/widget]
Now when this shortcode output then it shows my title query but no action for other three query. I tried this with all widget, same problem.
Please check if my query format is mistaken.
and here is my shortcode function
add_shortcode('widget','widget'); function ra_widget($atts, $content) { // Configure defaults and extract the attributes into variables extract( shortcode_atts( array( 'name' => '' ), $atts )); ob_start(); the_widget($name, $content, 'before_widget=<div class="post-widget">&after_widget=</div>&before_title=<h3>&after_title=</h3>'); $output = ob_get_clean(); return $output; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Calling widget using shortcode query poblem’ is closed to new replies.