[wordpress插件] Custom Post Type Lockdown WordPress自定义帖子类型锁定WordPress

wordpress 插件 文章 2020-04-09 06:50 440 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Often times you use custom post types as bits of content but don’t want people to view them individually, outside their context, or search for them.

通常,您将自定义帖子类型用作内容的一部分,但不希望人们在其上下文之外单独查看它们或进行搜索。

This plugin does just that, allowing you to choose to redirect people to a different page, and even overwrite search results, on a granular, per-post basis.

该插件正是这样做的,它使您可以选择将用户重定向到另一个页面,甚至覆盖每个帖子的搜索结果。

This is useful, for example, if you have Staff as your custom post type, for example, but don’t want anyone visiting the single of that staff and instead want them going to a staff overview page.

例如,如果您将“职员”作为自定义帖子类型,但不希望任何人访问该职员的单身,而是希望他们进入“职员概述”页面,则此功能很有用。

Three options:

三个选项:

1. Checking “Prevent” next to a custom post type will not allow any single views of that type, and will redirect viewers to another page of your site.

1.选中自定义帖子类型旁边的“预防”将不允许该类型的任何单一视图,并且会将查看者重定向到您网站的另一页面。

2. Selecting the redirect page will redirect viewers of that single to this page – by default they will be redirected home.

2.选择重定向页面会将该单个观看者重定向到该页面-默认情况下,他们将被重定向到首页。

3. Selecting a search overwrite page will replace that custom post type’s results on the search page with your desired page;

3.选择一个搜索覆盖页面将用您想要的页面替换该搜索页面上该自定义帖子类型的结果;

it will overwrite the permalink and the excerpt.

它将覆盖固定链接和摘录。

安装步骤

    1. Upload CPTLockdown.php or the ‘CPTLockdown’ directory to your ‘/wp-content/plugins/’ directory
    2. 将CPTLockdown.php或“ CPTLockdown”目录上传到您的“ / wp-content / plugins /”目录

    3. Activate the Custom Post Down Lockdown plugin through the ‘Plugins’ page in WordPress
    4. 通过WordPress中的“插件”页面激活“自定义帖子锁定”插件

    5. Navigate to “Tools” -> “CPTLockdown” in your WordPress admin backend to use.
    6. 导航到WordPress管理后端中的“工具”->“ CPTLockdown”以供使用。

下载地址
https://downloads.wordpress.org/plugin/custom-post-type-lockdown.1.11.zip
-EOF-

AI助手支持GPT4.0