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 ssfg_add_markup_class( $attr, $context ) { | |
| // default classes to add | |
| $classes_to_add = apply_filters ('ssfg-classes-to-add', | |
| // default foundation markup values | |
| array( | |
| 'site-header' => 'row', | |
| 'site-container' => 'inner-wrap', | |
| 'site-footer' => 'row', | |
| 'content-sidebar-wrap' => '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
| <?php | |
| add_filter( 'genesis_markup_header-widget-area_output', 'prefix_opening_header_div', 10, 2 ); | |
| /** | |
| * Replace the opening header-right <aside> tag with a <div> tag to allow the | |
| * primary nav to be used in the header without being wrapped in an aside tag. | |
| * | |
| * @param $tag string The current tag for the .header-right widget area. | |
| * @param $args array The current args for genesis_attr() | |
| * @return $tag string The modified tag for the .header-right widget area. |
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( 'get_header', 'sk_posts_in_columns' ); | |
| function sk_posts_in_columns() { | |
| if ( is_home() || is_archive() ) { | |
| //* Display as columns | |
| add_filter( 'post_class', 'sk_display_in_columns' ); |
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: Full Width Content with Blog Posts | |
| */ | |
| //* Add outreach-pro-home body class | |
| add_filter( 'body_class', 'custom_body_class' ); | |
| function custom_body_class( $classes ) { |
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 | |
| /** | |
| * This file adds widgetized Home Page. | |
| * | |
| */ | |
| add_action( 'get_header', 'prefix_home_genesis_meta' ); | |
| /** | |
| * Add widget support for homepage. If no widgets active, display the default loop. | |
| * |
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 the site tagline section | |
| add_action( 'genesis_after_header', 'minimum_site_tagline' ); | |
| function minimum_site_tagline() { | |
| if (is_home() ) | |
| printf( '<div %s>', genesis_attr( 'site-tagline' ) ); | |
| genesis_structural_wrap( 'site-tagline' ); | |
| printf( '<div %s>', genesis_attr( 'site-tagline-left' ) ); | |
| printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) ); | |
| echo '</div>'; |
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 background-color to .footer-widgets | |
| add_filter( 'genesis_attr_footer-widgets', 'ap_attributes_footer_widgets' ); | |
| function ap_attributes_footer_widgets( $attributes ) { | |
| $background = get_field('footer_widgets_bg', option); | |
| $attributes['style'] = 'background-color:' . $background . ';'; | |
| return $attributes; | |
| } |
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
| //* Wrap .nav-primary in a custom div | |
| add_filter( 'genesis_do_nav', 'genesis_child_nav', 10, 3 ); | |
| function genesis_child_nav($nav_output, $nav, $args) { | |
| return '<div class="nav-primary-wrapper">' . $nav_output . '</div>'; | |
| } | |
| //* Wrap .nav-secondary in a custom div | |
| add_filter( 'genesis_do_subnav', 'genesis_child_subnav', 10, 3 ); |
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 add in opening php tag | |
| /** | |
| * Custom Genesis Home Loop with Character Limitation on Excerpt | |
| * | |
| * @package Custom Genesis Home Loop with Character Limitation on Excerpt | |
| * @author Neil Gee | |
| * @link http://wpbeaches.com | |
| * @copyright (c)2014, Neil Gee |
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 line! Just add what's below to the end of your functions.php file | |
| add_action( 'edit_form_after_title', 'rgc_posts_page_edit_form' ); | |
| function rgc_posts_page_edit_form() { | |
| global $post, $post_type, $post_ID; | |
| if ( $post_ID == get_option( 'page_for_posts' ) && empty( $post->post_content ) ) { | |
| add_post_type_support( $post_type, 'editor' ); | |
| } |