Created
November 19, 2018 17:18
-
-
Save restored316/b47dd75aa132a80903a4ea414a85aab5 to your computer and use it in GitHub Desktop.
Refined-Instagram-PHP-Template
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 | |
/** | |
* This file adds the Instagram Page Template to your theme. | |
*/ | |
/* | |
Template Name: Instagram | |
*/ | |
//* Add custom body class to the head | |
add_filter( 'body_class', 'r316_add_body_class' ); | |
function r316_add_body_class( $classes ) { | |
$classes[] = 'custom-instagram'; | |
return $classes; | |
} | |
//* Add widget support for category index. If no widgets are active, display the default loop. | |
add_action( 'genesis_meta', 'r316_category_genesis_meta' ); | |
function r316_category_genesis_meta() { | |
if ( is_active_sidebar( 'instagram' )) { | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'r316_instagram_sections' ); | |
} | |
} | |
//* Add the widget space | |
function r316_instagram_sections() { | |
genesis_widget_area( 'instagram', array( | |
'before' => '<div class="instagram widget-area">', | |
'after' => '</div>', | |
) ); | |
} | |
//* Add custom body class to the head | |
add_filter( 'body_class', 'refined_add_body_class' ); | |
function refined_add_body_class( $classes ) { | |
$classes[] = 'refined-landing'; | |
return $classes; | |
} | |
//* Force full width content layout | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
//* Remove navigation | |
remove_action( 'genesis_before_header', 'genesis_do_nav', 7 ); | |
remove_action( 'genesis_after_header', 'genesis_do_subnav' ); | |
remove_action( 'genesis_before_footer', 'refined_footer_menu', 7 ); | |
remove_action( 'genesis_header', 'refined_header_right_menu', 9 ); | |
remove_action( 'genesis_header', 'refined_header_left_menu', 6 ); | |
//* Remove site header elements | |
//remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); | |
//remove_action( 'genesis_header', 'genesis_do_header' ); | |
//remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); | |
//* Remove Announcement bar | |
remove_action( 'genesis_before', 'refined_announcement_widget', 8 ); | |
//* Remove widget above footer | |
remove_action( 'genesis_before_footer', 'refined_widget_above_content', 8 ); | |
//* Remove site footer widgets | |
remove_action( 'genesis_before_footer', 'refined_footer_widgets', 9 ); | |
//* Remove widget below footer | |
remove_action( 'genesis_before_footer', 'refined_widget_below_footer', 9 ); | |
//* Remove site footer elements | |
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 ); | |
//* Remove flexible footer widget area | |
remove_action( 'genesis_before_footer', 'refined_footer_widgets', 10 ); | |
//* Run the Genesis loop | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment