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 | |
| /* | |
| * Examples to add custom classes to Genesis WordPress Framework Markup when using HTML5 output | |
| */ | |
| add_action( 'genesis_setup', 'srf_add_cust_classes', 15 ); // Priority 15 ensures it runs after Genesis itself has setup. | |
| function srf_add_cust_classes() { | |
| add_filter( 'genesis_attr_site-inner', 'srf_attr_site_inner' ); | |
| add_filter( 'genesis_attr_content-sidebar-wrap', 'srf_attr_content_sidebar_wrap' ); | |
| add_filter( 'genesis_attr_content', 'srf_attr_content' ); | |
| add_filter( 'genesis_attr_sidebar-primary', 'srf_attr_sidebar_primary' ); |
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 | |
| $gallery = get_post_meta( get_the_ID(), 'home_slider'); // 'home_slider' is name of my ACF gallery field | |
| $image_ids = $gallery[0]; // It's an array within an array | |
| // If we have some images loop around and populate a new data array | |
| if( is_array( $image_ids )) { | |
| $image_ids_string = implode( ',', $image_ids ); // Soliloquy Dynamic requires image IDs to be passed as a comma separated list | |
| echo '<div class="gallery-slider">'; | |
| soliloquy_dynamic( array( | |
| 'id' => 'gallery-images', |
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 | |
| add_action( 'pre_get_posts', 'sk_change_blog_home_posts_per_page' ); | |
| /** | |
| * Change Posts Per Page for Blog Home | |
| * | |
| * @author Bill Erickson (original), changed by Sridhar Katakam | |
| * @link http://www.billerickson.net/customize-the-wordpress-query/ | |
| * @param object $query data |
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
| <h1 itemprop="headline" class="entry-title">About</h1> |
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 | |
| //* Add new image size | |
| add_image_size( 'masonry-thumb', 270, 0, true ); |
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 | |
| //* Make Font Awesome available | |
| add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
| function enqueue_font_awesome() { | |
| wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' ); | |
| } |
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 | |
| add_action( 'genesis_header', 'sk_primary_nav_visibility' ); | |
| /** | |
| * Remove Primary Navigation from homepage for all users, keep it visible | |
| * on inner pages but only for logged in users | |
| * | |
| * | |
| * @author Sridhar Katakam |
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
| if( genesis_has_post_type_archive_support() ){ | |
| $intro_text = genesis_get_cpt_option( 'intro_text' ); | |
| if( !empty( $intro_text ) ){ | |
| echo apply_filters( 'genesis_term_intro_text_output', $intro_text ); | |
| } | |
| } |
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
| // Filter the title with a custom function | |
| add_filter('genesis_seo_title', 'wap_site_title' ); | |
| // Add additional custom style to site header | |
| function wap_site_title( $title ) { | |
| // Change $custom_title text as you wish | |
| $custom_title = '<span class="custom-title">WA</span>Estate'; | |
| // Don't change the rest of this on down |