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 | |
/** | |
* Lifestyle Archive | |
* | |
* @package Liquor | |
* @author Bill Erickson <bill@billerickson.net> | |
* @copyright Copyright (c) 2011, Bill Erickson | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* | |
*/ |
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 | |
/** | |
* Rewrite Rules | |
* | |
* @package BE_Genesis_Child | |
* @author Bill Erickson <bill@billerickson.net> | |
* @copyright Copyright (c) 2011, Bill Erickson | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
*/ |
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 | |
/** | |
* Metaboxes | |
* | |
* This file registers any custom metaboxes | |
* | |
* @package BE_Genesis_Child | |
* @author Bill Erickson <bill@billerickson.net> | |
* @copyright Copyright (c) 2011, Bill Erickson | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
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 menu item to header-right menu | |
add_filter( 'wp_nav_menu_items', 'custom_nav_item', 10, 2 ); | |
function custom_nav_item( $menu, $args ) { | |
//* make sure we are in the primary menu | |
if ( 'ana-menu' !== $args->menu ) { | |
return $menu; | |
} | |
//* see if a nav extra was already specified with Theme options | |
if ( genesis_get_option( 'nav_extras' ) ) { | |
return $menu; |
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 custom fields to Display Posts Shortcode | |
* @author Bill Erickson | |
* @link http://wordpress.org/extend/plugins/display-posts-shortcode/ | |
* @link http://www.billerickson.net/shortcode-to-display-posts/comment-page-1/#comment-4565 | |
* | |
* @param $output string, the original markup for an individual post | |
* @param $atts array, all the attributes passed to the shortcode | |
* @param $image string, the image part of the output |
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 Chooser | |
* Use CPT archive templates for taxonomies | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/use-same-template-for-taxonomy-and-cpt-archive/ | |
* | |
* @param string, default template path | |
* @return string, modified template path |
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_filter( 'genesis_nav_items', 'be_follow_icons', 10, 2 ); | |
add_filter( 'wp_nav_menu_items', 'be_follow_icons', 10, 2 ); | |
/** | |
* Follow Icons in Menu | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/genesis-wordpress-nav-menu-content/ | |
* | |
* @param string $menu |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldsite.com', 'http://www.newsite.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.oldsite.com', 'http://www.newsite.com'); |
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
// Smooth scrolling anchor links | |
function ea_scroll( hash ) { | |
var target = $( hash ); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
var top_offset = 0; | |
if ( $('.site-header').css('position') == 'fixed' ) { | |
top_offset = $('.site-header').height(); | |
} | |
if( $('body').hasClass('admin-bar') ) { |
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 | |
$rows = get_post_meta( get_the_ID(), 'be_content', true ); | |
foreach( $rows as $count => $row ) { | |
switch ( $row ) { | |
case 'type_1': | |
$content = get_post_meta( get_the_ID(), 'be_content_' . $count . '_field_name', true ); | |
echo '<div class="type-one">' . wpautop( $content ) . '</div>; |