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
| /** | |
| * Example: Change number or products per row to 4 | |
| */ | |
| add_filter('loop_shop_columns', 'loop_columns', 999); | |
| if (!function_exists('loop_columns')) { | |
| function loop_columns() { | |
| return 4; // 4 products per row | |
| } | |
| } |
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_after_header', 'sk_blog_banner' ); | |
| /** | |
| * Full Width Banner w. Image on Posts page | |
| */ | |
| function sk_blog_banner() { | |
| if ( ! is_home() ) { | |
| return; | |
| } ?> | |
| <div class="blog-banner"> |
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. | |
| // Remove site footer. | |
| remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
| remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
| remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); | |
| // Customize site footer | |
| add_action( 'genesis_footer', 'sp_custom_footer' ); | |
| function sp_custom_footer() { ?> |
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. | |
| // Register Newsletter widget area. | |
| genesis_register_sidebar( array( | |
| 'id' => 'newsletter', | |
| 'name' => __( 'Newsletter', 'theme-name' ), | |
| 'description' => __( 'Newsletter widget area.', 'theme-name' ), | |
| ) ); |
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( ‘woocommerce_allow_marketplace_suggestions’, ‘__return_false’ ); |
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_pre_get_option_site_layout', 'change_layout_woocommerce'); | |
| function change_layout_woocommerce( $opt ) { | |
| if ( ! class_exists( 'WooCommerce' ) ) | |
| return; | |
| if (is_shop() ) { | |
| $opt = 'full-width-content'; | |
| return $opt; | |
| } | |
| } |
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
| //remove comments from pages | |
| add_action('init', 'remove_comment_support', 100); | |
| function remove_comment_support() { | |
| remove_post_type_support( 'page', 'comments' ); | |
| } |
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
| <!-- Begin Comment | |
| <?php comments_template(); ?> | |
| End Comment --> |
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
| <!-- Begin Comment | |
| <?php comments_template( '', true ); ?> | |
| End Comment --> | |
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
| //* WORD COUNT IN POSTS | |
| add_shortcode( 'word_count', 'word_count' ); | |
| function word_count() { | |
| return sprintf( __( '%s words', 'text-domain' ), str_word_count( strip_tags( get_post_field( 'post_content', get_the_ID() ) ), 0 ) ); | |
| } | |
| add_filter( 'genesis_post_info', 'custom_post_info_filter' ); | |
| function custom_post_info_filter( $post_info ) { | |
| if ( is_singular( 'post' ) ) { | |
| $post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit] [word_count]'; |