codeinwp/full-width-page-templates
Composer 安装命令:
composer require codeinwp/full-width-page-templates
包简介
A WordPress library to create full width page templates.
README 文档
README
A composer library which injects, in WordPress Dashboard, a Full-Width option in the Page Template selector.
Supported Builders:
- A plain simple WordPress page
- Elementor
Compatible themes?
At this moment this library ensures compatibility with the follwing WordPress themes(and more to come):
- Hestia - by ThemeIsle
- Hestia Pro - by ThemeIsle
- Zerif Lite - by ThemeIsle
- ShopIsle - by ThemeIsle
- Orfeo - by ThemeIsle
- Edge - By themefreesia
- Experon - ThinkUpThemes
- Genesis - By StudioPress
- GeneratePress - By Tom Usborne
- Storefront - by WooThemes/Automattic
- TwentyTwelve - by WordPress.org
- TwentyThirteen - by WordPress.org
- TwentyFourteen - by WordPress.org
- TwentyFifteen - by WordPress.org
- TwentySixteen - by WordPress.org
- TwentySeventeen - by WordPress.org
- Vantage - by Greg Priday
- Virtue - by Kadence Themes
- Enlightenment - by Daniel Tara
- Actions - by WPDevHQ
- ActionsPro - by WPDevHQ
- Kale - by lyrathemes
- InVogue - by Kaira
- Universal-Store - by Themes4WP
- Editorial - by Mystery Themes
- Renden Business - by ThinkUpThemes
- Spacious - by ThemeGrill
- Flash - by ThemeGrill
- Writee - by Scissor Themes
- VT Blogging - by VolThemes
- One Page Express - by horearadu
- Primer - by GoDaddy
- Vantage - by SiteOrigin
- Customizr - by Nicolas Guillaume
- Nikko Portfolio - by Colormelon
- Poseidon - by ThemeZee
- Envo Business - by EnvoThemes
- Hueman - by Nicolas Guillaume
- News Portal - by Mystery Themes
- Illdy - by Silkalns
- Envy Blog - by Precise Themes
- Avant - by Kaira
- OceanWP - by oceanwp
- Astra - by Brainstorm Force
- Mesmerize - by horearadu
- Sydney - by athemes
- Ashe - by Royal Flush
- Lodestar - by Automattic
- Total - by Hash Themes
- Consulting - by ThinkUpThemes
- ColorMag - by ThemeGrill
- OnePress - by FameThemes
- Shapely - by Silkalns
- HitMag - by ThemezHut
- Divi - by Elegant Themes
How to use it?
Well, this is a Composer library so you will need to add this it as a dependency on your project( either plugin or a theme ) like this:
"require": {
"codeinwp/full-width-page-templates": "master"
}
And run a via the terminal a composer install and hope that you have Composer installed globally.
The last step is the initialization. Call this wherever you like:
if ( class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
\ThemeIsle\FullWidthTemplates::instance();
}
Work with this repository?
To work directly with this repository, I use and recommend the following way.
Clone this repository inside the mu-plugins WordPress directory. This way, we can be sure that the cloned version of this
library will have priority before the one loaded from Composer.
After cloning you need to create a php file, like load-fwt-lib.php(I'm so bad at naming) and inside you will need to require the loader like this:
<?php
require_once( dirname( __FILE__ ) . '/full-width-page-templates/load.php' );
How to make a theme compatible with the full-width template?
To add a new theme to the compatibility list, clone this repository(as we talked above) create a new directory with the
theme's name in the themes directory.
This theme directory supports two files:
inline-style.php- A file loaded at the right moment to add an inline stylefunctions.php- An optional file to add actions and filters.
Our goal here is to add a CSS snippet which will make sure that the page container width full.
So make use of the inline-style.php and add a snipet like this:
<?php
/* Support for the {Theme Name} theme */
$style = '.page-template-builder-fullwidth-std .site-content {
width: 100%;
padding: 0;
margin:0;
}';
wp_add_inline_style( '{theme-style}', $style );
Where {theme-style} must be an enqueued style.(For example, Twenty Seventeen has 'twentyseventeen-style')
Don't forget to add the new theme to this README.md ;)
codeinwp/full-width-page-templates 适用场景与选型建议
codeinwp/full-width-page-templates 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.28k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 01 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 codeinwp/full-width-page-templates 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 codeinwp/full-width-page-templates 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4.28k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 16
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2018-01-15