开发者

regarding wordpress to show single widget

Is there any API function which display single widget anywhere in our template by passing widget id or name s开发者_JAVA技巧omething.

I just wanna show Tag Cloud widget alone in ma home page. front-page.php

Thanks,

Edvin :)


the_widget() allows you to display a single widget. You do not have to configure it first in the administration area.

the_widget(
    'WP_Widget_Tag_Cloud',
    array(
        'title' => 'Popular tags',
    ),
    array(
        'before_title' => '<h3>',
        'after_title' => '</h3>',
    )
);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜