codeinwp / full-width-page-templates
A WordPress library to create full width page templates.
Installs: 3 800
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 3
Open Issues: 2
This package is auto-updated.
Last update: 2024-11-29 05:44:37 UTC
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 ;)