This file contains hidden or 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
function add_bulk_async_sdk() { ?> | |
<script> | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], | |
add = function(url, id) { | |
if (doc.getElementById(id)) {return;} | |
js = doc.createElement(script); | |
js.src = url; | |
id && (js.id = id); |
This file contains hidden or 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
/* WordPress Gallery | |
------------------------------------------ */ | |
.gallery { | |
margin-left: -0.5em; | |
margin-right: -0.5em; | |
} | |
.gallery:after { | |
display: table; |
This file contains hidden or 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 | |
/** | |
* Custom Loop for Archive Layout | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/ | |
*/ | |
function be_archive_layout_loop() { | |
$site_layout = genesis_site_layout(); | |
if ( 'sidebar-content-archive' == $site_layout ) { | |
be_archive_loop(); |
This file contains hidden or 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 | |
/** | |
* Create Archive Layout | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/ | |
*/ | |
function be_create_archive_layout() { | |
genesis_register_layout( 'sidebar-content-archive', array( | |
'label' => __('Sidebar/Content Archive', 'genesis'), | |
'img' => get_bloginfo('stylesheet_directory') . '/images/layout-sidebar-content-archive.gif' |
This file contains hidden or 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_filter( 'genesis_attr_entry-image', 'be_remove_image_alignment' ); | |
function be_remove_image_alignment( $attributes ) { | |
$attributes['class'] = str_replace( 'alignleft', 'alignnone', $attributes['class'] ); | |
return $attributes; | |
} | |
This file contains hidden or 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
if ( !class_exists('JMO_Custom_Nav')) { | |
class JMO_Custom_Nav { | |
public function add_nav_menu_meta_boxes() { | |
add_meta_box( | |
'wl_login_nav_link', | |
__('WishList Login'), | |
array( $this, 'nav_menu_link'), | |
'nav-menus', | |
'side', | |
'low' |
This file contains hidden or 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_filter( 'genesis_get_image_default_args', 'prefix_stop_auto_featured_image' ); | |
function prefix_stop_auto_featured_image( $args ) { | |
if ( ! isset( $args['context'] ) || 'archive' !== $args['context'] ) | |
return $args; | |
$args['fallback'] = false; | |
return $args; | |
} |
This file contains hidden or 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 Image Alignment from Featured Image | |
* | |
*/ | |
function be_remove_image_alignment( $attributes ) { | |
$attributes['class'] = str_replace( 'alignleft', 'alignnone', $attributes['class'] ); | |
return $attributes; | |
} |
This file contains hidden or 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_action('genesis_post_content', 'title'); | |
function title() { | |
if ( is_single() && genesis_get_custom_field('title') ) | |
echo '<hr /><div id="postition_title">Title: '. genesis_get_custom_field('title') .'</div>'; | |
} | |
add_action('genesis_post_content', 'phone'); | |
function phone() { | |
if ( is_single() && genesis_get_custom_field('phone') ) | |
echo '<div id="phone">Phone Number: '. '<a href="tel:' .genesis_get_custom_field('phone') . '">' . genesis_get_custom_field('phone') .'</a></div>'; |
This file contains hidden or 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
/* redirect for slide pages */ | |
add_action('template_redirect', 'slide_template_redirect', 1); | |
function slide_template_redirect(){ | |
if ( in_category('homepage-slider') ) { | |
if(get_field('landing_page')){ | |
wp_redirect( get_field('landing_page'), 301); | |
exit; | |
} | |
} | |
return; |