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 message for subscription products in order complete email */ | |
add_action( 'woocommerce_email_after_order_table', 'wc_completed_email_snippet' ); | |
function wc_completed_email_snippet( $order ) { | |
$order_statuses = array( 'completed' ); // order statuses to enable the email on | |
$display_cats = array( 148, 149 ); // cat ID's of products to display the message on completed emails for | |
if( in_array( $order->status, $order_statuses ) ) | |
return; // only completed orders | |
if( !class_exists( 'WC_Subscriptions_Order' ) || !class_exists( 'WC_Subscriptions_Renewal_Order' ) ) |
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 | |
/** | |
* Taxonomies | |
* | |
* This file registers any custom taxonomies | |
* | |
* @package Core_Functionality | |
* @since 1.0.0 | |
* @link https://github.com/billerickson/Core-Functionality | |
* @author Bill Erickson <[email protected]> |
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 | |
function upload_image_metabox() { | |
echo '<p><strong>Upload image</strong></p>'; | |
echo '<input type="text" id="child_logo_url" name="' . $this->get_field_name( 'welcome-image' ) . '" value="' . esc_attr( $this->get_field_value( 'welcome-image' ) ) . '" size="50" />'; | |
echo '<input id="child_upload_logo_button" type="button" class="button" value="Upload Image" /> '; | |
?> | |
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 | |
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
* | |
* @link http://wordimpress.com/how-to-load-woocommerce-scripts-and-styles-only-in-shop/ | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
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 | |
/** | |
* Customize post meta. | |
* | |
* @since 3.0 | |
*/ | |
//* Customize the post meta function | |
add_filter( 'genesis_post_meta', 'child_post_meta_filter' ); |
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 | |
$featured_posts = get_posts( | |
array( | |
'posts_per_page' => 5, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'post_tag', | |
'field' => 'slug', | |
'terms' => 'featured', |
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 | |
/** | |
* Template Name: Page Builder | |
* | |
* This page template only works with Genesis child themes and works great with the | |
* Beaver Builder plugin. Learn more: http://clickwp.com/blog/beaver-builder/ | |
*/ | |
// Force full width content layout to remove sidebar |
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
<!-- open external links in new window --> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$('div.entry-content a, aside.sidebar a').each(function() { | |
var a = new RegExp('/' + window.location.host + '/'); | |
if(!a.test(this.href)) { | |
$(this).click(function(event) { | |
event.preventDefault(); | |
event.stopPropagation(); | |
window.open(this.href, '_blank'); |
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 page titles for Guest Authors with WordPress SEO | |
* Returns "[author name]'s articles on [site name]" | |
* | |
*/ | |
add_filter('wpseo_title', 'my_co_author_wseo_title'); | |
function my_co_author_wseo_title( $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 | |
//* Do NOT include the opening php tag shown above. Only modified code shown below. | |
function metro_homepage_widgets() { | |
// get the transient | |
$metro_homepage_content = get_transient( 'metro_homepage_content' ); | |
// check if homepage content exists | |
if ( false === $metro_homepage_content ) : |
OlderNewer