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 | |
/* | |
Author: Doug Edgington | |
Description: Shortcode to output custom post type in a grid | |
*/ | |
function dee_display_bios() { | |
$args = array( | |
'post_type' => 'dee_bios', | |
'orderby' => 'title', |
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 | |
/* | |
Author: Doug Edgington | |
Description: Shortcode to output recent posts from one category | |
*/ | |
function dee_display_recent_posts() { | |
$args = array( | |
'post_type' => 'post', | |
'posts_per_page'=> 5, | |
'cat'=> 4, |
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 | |
/*enable shortcode in text widget*/ | |
add_filter('widget_text', 'do_shortcode'); |
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 | |
/* | |
Description: Top message sidebar with the Genesis Framework | |
*/ | |
genesis_register_sidebar( array( | |
'id' => 'top-message', | |
'name' => __( 'Top Message', 'themename' ), | |
'description' => __( 'This is the top of site message widget area.', 'themename' ), | |
) ); |
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 | |
/* | |
Author: Doug Edgington | |
Description: If sidebar is active, output sidebar above header with the Genesis Framework | |
*/ | |
add_action( 'genesis_before_header', 'dee_do_top_message' ); | |
function dee_do_top_message() { | |
if ( is_active_sidebar( 'top-message' ) ) { | |
echo '<div id="top-message">'; |
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 | |
/* | |
Author: Doug Edgington | |
Description: Require a minimum order total in Woocommerce for a user role | |
*/ | |
function dee_minimum_order_total_required() { | |
if( is_user_logged_in() ) { |
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 | |
/* | |
Author: Doug Edgington | |
Description: Shortcode to display a minimum order total required message to | |
users in a specific user role on checkout page when using Woocommerce | |
*/ | |
function dee_minimum_order_total_message() { | |
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 | |
/* | |
Author: Doug Edgington | |
Description: Shortcode to display WordPress bookmark links (Blog Roll). | |
Used to add links to a page rather than a sidebar using the WordPress links widget. | |
*/ | |
function dee_display_bookmark_links() { | |
$args = array( |
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 | |
/* | |
Author: Doug Edgington | |
Description: modified version of Woocomemrce SSL functionality, forces ssl on Woocommerce pages and two additional custom pages | |
*/ | |
function dee_ssl_template_redirect() { | |
if ( ! is_ssl() ) { | |
if ( is_checkout() || is_account_page() || is_page(48) || is_page(64) ) { |
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_action( 'genesis_after_content', 'genesis_get_sidebar' ); | |
add_action('genesis_before_content', 'genesis_get_sidebar'); | |
?> |
OlderNewer