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 phpinfo(); ?> |
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 | |
/** | |
* Page template file to display an archive list of only pages | |
* | |
*/ | |
//* Template Name: Archive Pages Only | |
//* Remove standard post content output | |
remove_action( 'genesis_post_content', 'genesis_do_post_content' ); |
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 | |
// Don't copy opening PHP tag above | |
// Customize the post info function by date | |
add_filter( 'genesis_post_info', 'wsm_post_info_filter' ); | |
function wsm_post_info_filter( $post_info ) { | |
$post_date = the_date( 'Y-m-d','','', false ); | |
$date_limit = date( "Y-m-d", mktime(0,0,0,date("m")-6, date("d"), date("Y")) ); |
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 | |
// DO not copy opening PHP tag above | |
// Enable Gravity Forms setting to hide form labels | |
add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' ); |
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 | |
// Do not copy the opening <?php tag above | |
// Customize the Free! price output | |
add_filter( 'woocommerce_variable_free_price_html','wsm_custom_free_price' ); | |
add_filter( 'woocommerce_free_price_html', 'wsm_custom_free_price' ); | |
add_filter( 'woocommerce_variation_free_price_html', 'wsm_custom_free_price' ); | |
function wsm_custom_free_price( $price ) { | |
// Edit content between single quotes below to desired output | |
return 'Prepaid Inventory'; |
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 | |
// Don't copy above opening PHP tag | |
// Display Custom logo based on WPML language displayed | |
add_action('wp_head','wsm_lang_logo_image_logic'); | |
function wsm_lang_logo_image_logic() { | |
if ( !defined( 'ICL_LANGUAGE_CODE' ) ) { | |
return; | |
} |
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 | |
// Don't copy opening PHP tag above | |
// Add below code to your theme's functions.php file. | |
// Only show blog posts in search results | |
add_filter( 'pre_get_posts','wsm_post_only_search_filter' ); | |
function wsm_post_only_search_filter( $query ) { | |
if ( $query->is_search ) { | |
$query->set( 'post_type', 'post' ); | |
} |
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 for Taxonomies | |
function wsm_add_for_taxonomies( $display, $meta_box, $taxonomy ) { | |
if ( 'taxonomy' !== $meta_box['show_on']['key'] ) | |
return $display; | |
// Get the post's ID so we can see if it has ancestors | |
if( isset( $_GET['post'] ) ) $post_id = $_GET['post']; | |
elseif( isset( $_POST['post_ID'] ) ) $post_id = $_POST['post_ID']; |
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 | |
// Modify the author box title | |
add_filter('genesis_author_box_title', 'child_author_box_title'); | |
function child_author_box_title($title) { | |
$title = sprintf( '<h3>%s %s</h3>', __( 'About', 'genesis' ), get_the_author() ) ); | |
return $title; | |
} |