Customizing widgets called by shortcodes
-
Widgets when used via the dashboard will allow various customizations. For instance if I want to not use a title above the widget, I just leave the widget’s title box blank. Or I can choose how many post titles to display in the Recent Posts widget.
But I’m adding widgets to parts of my WordPress site via a script in my functions.php that allows them pretty much anywhere via a shortcode. Problem is I need to know what parameters are available for any given widget and how to call it in the shortcode. For example, this shortcode works in my page:
[widget widget_name="WP_Widget_Recent_Posts"]
But how do I control the number of posts? How can I make the title “Recent Posts” not appear. Nothing I’ve tried works. For example, this doesn’t work.
[widget widget_name="WP_Widget_Recent_Posts" title=""]
Where can I learn how to affect customizations on widgets via shortcodes? Thanks.
- The topic ‘Customizing widgets called by shortcodes’ is closed to new replies.