开发者

Wordpress: avoid pages being listed in a widget

I'm developing a WordPress plugin that uses 2 pages for a specific purpose.

When I create the two pages manually with a template that I created they are listed as links on the main page but I don't want them to be shown. How can I avoid them to be shown?开发者_如何学C

Can I change something on my template so that they are not shown?

Thanks!


You can use something like http://wordpress.org/extend/plugins/exclude-pages or tweak http://codex.wordpress.org/Function_Reference/wp_list_pages for a theme that doesn't use WP3 menus, or exclude pages within the menu system in a WP3-compatible theme.

But trying to exclude pages when your plugin is used by other people is going to run into problems. How can you consistently exclude pages in all circumstances? What happens if someone already has a page named the same as the pages your plugin generates?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜