[wordpress插件] Backdrop Post Types背景信息类型

wordpress 插件 文章 2020-02-28 06:30 478 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Backdrop Post Types allows you to create a new post type without configurations.

背景帖子类型可让您无需配置即可创建新的帖子类型。

By Default, Portfolio Post Type is registered.

默认情况下,注册投资组合过帐类型。

Working with Themes

使用主题

By default, portoflio post type is already registered.

默认情况下,portoflio帖子类型已被注册。

If you wish to not used the default post type, you can disable it using add_filter();

如果您不想使用默认的帖子类型,可以使用add_filter()禁用它。

in your functions.php as follow

在您的functions.php中,如下所示

add_filter( ‘backdrop_post_types_override_portfolio’, ‘__return_true’ );

add_filter('backdrop_post_types_override_portfolio','__return_true');

To create a new post type by creating a folder called post-types/demo.php somewhere in your theme and use the following to register a new post type.

要通过在主题中的某个位置创建名为post-types / demo.php的文件夹来创建新的帖子类型,并使用以下内容注册新的帖子类型。

$demo = new \Benlumia007\BackdropPostTypes\Register\PostType( ‘demo’ );

$ demo = new \ Benlumia007 \ BackdropPostTypes \ Register \ PostType('demo');

$demo->create_post_type( ‘demo’, ‘Demo’, ‘Demos’ );

$ demo-> create_post_type('demo','Demo','Demos');

$demo->register();

$ demo-> register();

安装步骤

1.0 – In your admin panel, go to Appearance -> Plugins and click the Add New button.

1.0 –在管理面板中,转到外观->插件,然后单击添加新按钮。

2.0 – Click Upload and Choose File, then select the theme’s ZIP file.

2.0 –单击上载并选择文件,然后选择主题的ZIP文件。

Click Install Now.

单击立即安装。

3.0 – Click Activate to use your new plugin right away.

3.0 –单击“激活”立即使用您的新插件。

下载地址
https://downloads.wordpress.org/plugin/backdrop-post-types.1.0.1.zip
-EOF-

AI助手支持GPT4.0