开发者

Creating a shortcode with a WordPress multi-instance widget

开发者 https://www.devze.com 2023-04-01 13:42 出处:网络
http://codex.wordpress.org/Plugins/WordPress_Widgets_Api I created a simple plugin as per this post and it works great as a multi-instance widget. I can not however get a shortcode working to place i

http://codex.wordpress.org/Plugins/WordPress_Widgets_Api

I created a simple plugin as per this post and it works great as a multi-instance widget. I can not however get a shortcode working to place in my posts to display the widget. I added this at the end of the plugin code after the widget init, but no go. Any ideas on how to get t开发者_JAVA百科his working? thx!

add_shortcode("presskit-contact", "FooWidgetHandler");

function FooWidgetHandler() {$foo_output = FooWidget();return $foo_output;}


http://www.ilovecolors.com.ar/sidebar-widgets-shortcode-wordpress/

I found this which solved my problem

0

精彩评论

暂无评论...
验证码 换一张
取 消