Created
March 31, 2019 06:50
-
-
Save incidunt/4292fd470d93b184310f8e792ac3d1e8 to your computer and use it in GitHub Desktop.
page-best-wordpress-plugins.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: bestwordpressplugins | |
*/ | |
// Forces full width content layout. | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
add_action( 'wp_head', 'custom_genesis_page_builder_styles' ); | |
/** | |
* Echo the necessary "Full Page Width" styles into the head of the page. | |
* Credit for the following CSS goes to the developer of the "Genesis Dambuster" | |
* Plugin as this CSS is an edited version of that Plugin's full-width.css file. | |
*/ | |
function custom_genesis_page_builder_styles() { | |
echo ' | |
<style type="text/css"> | |
.extender-page-builder, | |
.extender-page-builder .site-container, | |
.extender-page-builder .site-container .site-inner { | |
max-width: 100%; | |
width: 100%; | |
background: none; | |
border: 0; | |
float: none; | |
margin: 0 auto; | |
padding: 0; | |
box-shadow: none; | |
border-radius: 0; | |
-webkit-border-radius: 0; | |
-webkit-box-shadow: none; | |
} | |
.extender-page-builder .center-block { margin: 0 auto; } | |
.extender-page-builder .center-text { text-align: center; } | |
.extender-page-builder .clearfix:before, .clearfix:after { content: "\0020"; display: table; } | |
.extender-page-builder .clearfix:after { clear: both; } | |
.extender-page-builder .clearfix { *zoom: 1; } | |
@media screen and (max-width: 500px) { | |
.extender-page-builder .fl-row-bg-video video { | |
left:0 !important; | |
} | |
.extender-page-builder .fl-row-bg-video { | |
min-width: 360px; | |
} | |
} | |
</style> | |
'; | |
} | |
add_filter( 'body_class', 'custom_genesis_page_builder_body_class' ); | |
/** | |
* Adds a css class to the body element | |
* | |
* @param array $classes the current body classes | |
* @return array $classes modified classes | |
*/ | |
function custom_genesis_page_builder_body_class( $classes ) { | |
$classes[] = 'extender-page-builder'; | |
return $classes; | |
} | |
add_filter( 'genesis_attr_site-inner', 'custom_genesis_page_builder_attributes_site_inner' ); | |
/** | |
* Add attributes for site-inner element. | |
* | |
* @since 2.0.0 | |
* | |
* @param array $attributes Existing attributes. | |
* | |
* @return array Amended attributes. | |
*/ | |
function custom_genesis_page_builder_attributes_site_inner( $attributes ) { | |
$attributes['role'] = 'main'; | |
$attributes['itemprop'] = 'mainContentOfPage'; | |
return $attributes; | |
} | |
// Remove div.site-inner's div.wrap | |
add_filter( 'genesis_structural_wrap-site-inner', '__return_empty_string' ); | |
// Removes Skip Links. | |
remove_action( 'genesis_before_header', 'genesis_skip_links', 5 ); | |
add_action( 'wp_enqueue_scripts', 'genesis_sample_dequeue_skip_links' ); | |
/** | |
* Dequeues Skip Links Script. | |
* | |
* @since 1.0.0 | |
*/ | |
function genesis_sample_dequeue_skip_links() { | |
wp_dequeue_script( 'skip-links' ); | |
} | |
// Removes breadcrumbs. | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
//Removes title. | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
// Removes footer widgets. | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
// Removes site footer elements. | |
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); | |
remove_action( 'genesis_footer', 'athk_custom_site_footer' ); | |
// do the bootstrap-vue table | |
add_action('genesis_after_content','child_bootstrapvue'); | |
function child_bootstrapvue(){ | |
echo '<div id="app"></div>'; | |
wp_enqueue_style('child_bootstrapvueCSS', get_stylesheet_directory_uri().'/plugin-tables/dist/main.css'); | |
wp_enqueue_script('child_bootstrapvueJS', get_stylesheet_directory_uri().'/plugin-tables/dist/build.js', | |
null, | |
CHILD_THEME_VERSION, | |
true | |
); | |
}; | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment