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 | |
// Remove all of the Beaver Builder child theme presets | |
//(does not remove default as you should overwrite default with your child theme's default settings) | |
function es_remove_presets() | |
{ | |
FLCustomizer::remove_preset( 'default-dark' ); | |
FLCustomizer::remove_preset( 'classic' ); | |
FLCustomizer::remove_preset( 'modern' ); | |
FLCustomizer::remove_preset( 'bold' ); |
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 | |
// Add home hero image as a background in head of home template only w/ media query | |
// Make sure you have a <div class="home-hero-image"> on the front page template | |
if( function_exists('get_field') ) { | |
if ( ! function_exists( 'home_hero_image' ) ) : | |
add_action( 'wp_head', 'home_hero_image', 16 ); |
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 | |
/** | |
* Adding additional options in Genesis Theme Settings page for gathering a comma sep list of excluded categories | |
* Thanks to @author Bill Erickson for the jumping off point! | |
* @link http://www.billerickson.net/genesis-theme-options/ | |
* @package yourthemenamehere | |
*/ | |
/** |
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 | |
/** | |
* Add a shortcode for mailto link | |
* Use: [mailto]email@yourdomain.com[/mailto] | |
*/ | |
function make_cool_mailto_shortcode( $atts , $content = null ) { | |
for ($i = 0; $i < strlen($content); $i++) $encodedmail .= "&#" . ord($content[$i]) . ';'; | |
return '<a href="mailto:'.$encodedmail.'">'.$encodedmail.'</a>'; |
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
// Add the page title of the posts page above the posts on the post page | |
// (But not on the blog template, rather on the posts page set up in Settings --> Reading) | |
add_action( 'genesis_before', 'jh_blog_page_title' ); | |
function jh_blog_page_title() { | |
if ( is_home() ) { | |
add_action( 'genesis_before_content', 'jh_show_blog_page_title_text' ); | |
} | |
} | |
function jh_show_blog_page_title_text() { |
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
//* Don't show layout settings box on certain template pages admin | |
add_action( 'init', 'remove_layouts_templates_init' ); | |
function remove_layouts_templates_init() { | |
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ; | |
$template_file = get_post_meta($post_id,'_wp_page_template',TRUE); | |
// check for the following template types | |
if ($template_file == 'page-home.php' | |
or $template_file == 'page-testimonial.php' | |
or $template_file == 'page-landing.php' |