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 | |
/** | |
* Remove redundant Genesis meta boxes. | |
* | |
* @param string $pagehook Page hook for the Theme Settings page. | |
* | |
* @since 1.1.0 | |
*/ | |
add_action( 'genesis_theme_settings_metaboxes', function ( $pagehook ) { |
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 | |
/** | |
* Stop Genesis adding `header-*` classes to <body>. | |
* | |
* @since 1.0.0 | |
*/ | |
remove_filter( 'body_class', 'genesis_header_body_classes' ); | |
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_action( 'genesis_meta', __NAMESPACE__ . '\\remove_redundant_markup' ); | |
/** | |
* Remove the redundant .site-inner and .content-sidebar-wrap markup. | |
* | |
* @since 1.0.0 | |
*/ | |
function remove_redundant_markup() { |
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 | |
/** | |
* Template Name: Testimonials - ACF Functions | |
*/ | |
add_action( 'genesis_entry_content', 'prefix_output_testimonials' ); | |
/** | |
* Output ACF testimonials. | |
* | |
* @link https://acfextras.com/simple-testimonials-repeater-field/ |
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 //<= dont add me in | |
add_action( 'customize_register', 'themeprefix_customizer_featured_image' ); | |
function themeprefix_customizer_featured_image() { | |
global $wp_customize; | |
// Add featured image section to the Customizer | |
$wp_customize->add_section( |
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 | |
/* Remove default titles | |
------------------------------------------------------------ */ | |
add_action( 'get_header', 'child_remove_page_titles' ); | |
function child_remove_page_titles() { | |
if ( is_page() && ! is_page_template( 'page_blog.php') || $post->post_parent ) { | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); |
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 if ( get_field( 'field_name' ) ): ?> | |
This is displayed when the field_name is TRUE or has a value. | |
<?php else: // field_name returned false ?> | |
This is displayed when the field is FALSE, NULL or the field does not exist. | |
<?php endif; // end of if field_name logic ?> |
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 if(get_field('repeater_field_name')): ?> | |
<div class="flexslider"> | |
<ul class="slides"> | |
<?php while(has_sub_field('repeater_field_name')): ?> | |
<li> | |
<img src="<?php the_sub_field('sub_field'); ?>" /> | |
</li> | |
<?php endwhile; ?> | |
</ul> | |
</div> |
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 | |
// Adds a [social-icons] shortcode to output Genesis Simple Share icons in posts | |
// https://wordpress.org/plugins/genesis-simple-share/ | |
// Add the code below to your active theme's functions.php file, | |
// or use in a site-specific plugin. | |
// The shortcode takes no attributes; change your icon settings via Genesis → Simple Share. | |
add_shortcode( 'social-icons', 'gss_shortcode' ); |
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
// Deregister stylesheet Genesis Simple Share | |
add_action( 'wp_enqueue_scripts', 'wpstudio_deregister_styles' ); | |
function wpstudio_deregister_styles() { | |
wp_deregister_style( 'genesis-simple-share-plugin-css' ); | |
} |