Exclude Pages WordPress 插件

描述

This plugin adds a checkbox, “include this page in menus”, uncheck this to exclude pages from the page navigation that users see on your site.

Any issues: contact me.This plugin adds a checkbox, “include this page in menus”, which is checked by default. If you uncheck
it, the page will not appear in any listings of pages (which includes, and is usually limited to, your
page navigation menus).

Pages which are children of excluded pages also do not show up in menu listings. (An alert in the editing screen,
underneath the “include” checkbox allows you to track down which ancestor page is affecting child pages
in this way.)

Advanced Usage

It is possible to temporarily pause and resume the effect of Exclude Pages by using the new <?php pause_exclude_pages(); ?> and <?php resume_exclude_pages(); ?> templates tags. The following code will show a list of all pages in your site, even those normally hidden:

<?php pause_exclude_pages(); ?><?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?><?php resume_exclude_pages(); ?>

You can also get an array the IDs of the pages which are excluded by calling the function ep_get_excluded_ids();, you can then use these IDs as you wish (e.g. feed them into raw MySQL queries).

Note to other plugin authors:

The plugin does not operate on wp_list_pages while the user is on an admin page, if this is an issue you can take advantage of the ep_admin_bail_out filter and create a filter function which returns false to allow Exclude Pages to operate in the admin area.

Another note:

If your plugins or themes don’t use the standard WordPress functions to create their menus then they won’t work. To get them to work you will need to track down the bit of code in the theme/plugin which gets the pages and change it to apply the filter “get_pages” (I cannot be responsible for any unforseen effects of the changes you make, so please test thoroughly). The change to getting pages will probably look something like this:

$pages = apply_filters( 'get_pages', $pages );

Please contact me if you’re completely stuck and we can discuss possible solutions.

Exclude pages is incompatible with:

  • WP CSS Dropdown Menus
  • Phantom theme – This theme

Requests & Bug Reports

I’m simply noting requests & bug reports here, I’ve not necessarily looked into any of these.

None!

相关推荐

发表回复

房先生
我们将24小时内回复。
2024-04-22 01:41:58
您好,有任何疑问请与我们联系!
您的工单我们已经收到,我们将会尽快跟您联系!
[QQ客服]
2781198
加我微信
[电话联系]
13585372227
[电子邮件]
[email protected]
取消

选择聊天工具: