[wordpress插件] Child Page Templates子页面模板

wordpress 插件 文章 2020-03-22 23:00 582 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Allows theme authors to include templates that will be automatically used based on the page’s parent.

允许主题作者包括将根据页面的父级自动使用的模板。

For example, adding the file “page-123.php” to the “child-page-templates” folder in your theme directory will define the template for all pages that are children of the page with ID #123.

例如,将文件“ page-123.php”添加到主题目录中的“ child-page-templates”文件夹中,将为ID为#123的页面的所有子页面定义模板。

You can also do the same thing with the post’s slug.

您还可以对帖子的内容进行同样的操作。

This template file will be used for all pages that are children of the page with ID #123:

此模板文件将用于ID为#123的页面的子页面的所有页面:

/wp-content/themes/your-awesome-theme/child-page-templates/page-123.php

/wp-content/themes/your-awesome-theme/child-page-templates/page-123.php

This template file will be used for all pages that are children of the page with the “team” slug:

此模板文件将用于所有带有“ team”子句的页面的子页面的页面:

/wp-content/themes/your-awesome-theme/child-page-templates/page-team.php

/wp-content/themes/your-awesome-theme/child-page-templates/page-team.php

安装步骤

    1. Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the plugin from the “Plugins” page.
    2. 解压缩zip文件并将其内容拖放到WordPress安装的wp-content / plugins /目录中,然后从“插件”页面激活插件。

    3. Create a folder in your theme (or child theme, if you use one) called “child-page-templates”
    4. 在您的主题(或子主题,如果使用子主题)中创建一个名为“子页面模板”的文件夹

    5. Add a PHP file named after the slug or ID of the parent page you want to use a custom template for.

    6. 添加一个PHP文件,该文件以您要使用自定义模板的父页面的子段或ID命名。

        • For example: If you want every child page of your “Portfolio” page to use a particular template file, name that template file “page-portfolio.php”
        • 例如:如果您希望“ Portfolio”页面的每个子页面都使用特定的模板文件,则将该模板文件命名为“ page-portfolio.php”

下载地址
https://downloads.wordpress.org/plugin/child-page-templates.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Marketo Lite for Contact Form 7联系表7的Marketo Lite
[wordpress插件] Acceptto Multi Factor Authentication接受多因素身份验证
[wordpress插件] Disable WP Theme Updates Advance禁用WP主题更新高级
[wordpress插件] Custom Featured Image Metabox自定义精选图片元框
[wordpress插件] BP Login RedirectBP登录重定向
随便看看
wx.request中的请求参数data能不能做成动态的? 569
明明才群发3条,为什么就不能再群发了? 448
紧急,业务域名无法验证通过,如何解决? 531
获取手机号升级-未能正常获取code? 449
之前备案过的域名,怎么在微信又打不开呢? 453
微信小程序虚拟支付已关闭,如何获取历史结算单并提现? 549
微信小程序开发中的问题? 338
微信通过申请服务商骗钱!? 522
新备案域名在微信无法访问?无违法内容 465
微信登录失败? 424