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
// Add 'yst_prominent_words to the array of excluded taxonomies | |
function modify_categories_dropdown( $taxonomies ) { | |
$taxonomies[] = 'yst_prominent_words'; | |
return $taxonomies; | |
} | |
add_filter( 'beautiful_filters_taxonomies', 'modify_categories_dropdown', 10, 1 ); |
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
/** | |
* Add classes for pages and page parents | |
*/ | |
function prefix_add_specific_body_classes($classes) { | |
// Bail if we're not on a page | |
if (is_page()) { | |
global $post; | |
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
/** | |
* Set the theme colors | |
*/ | |
add_action( 'after_setup_theme', 'prefix_register_colors' ); | |
function prefix_register_colors() { | |
add_theme_support( | |
'editor-color-palette', array( | |
array( | |
'name' => esc_html__( 'Black', 'prefix_textdomain' ), | |
'slug' => 'black', |
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
//* Get the background image information (if the video is local) | |
$video_mp4 = wp_get_attachment_url( get_post_meta( $id, $context_prefix . $count . '_video_mp4', true ) ); | |
$video_webm = wp_get_attachment_url( get_post_meta( $id, $context_prefix . $count . '_video_webm', true ) ); | |
$image_fallback = wp_get_attachment_url( get_post_meta( $id, $context_prefix . $count . '_image_fallback', true ) ); |
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
/** | |
* Remove the wpautop filter from the_content | |
*/ | |
remove_filter( 'the_content', 'wpautop' ); | |
add_filter( 'the_content', function ($content) { | |
if (has_blocks()) { | |
return $content; | |
} | |
return wpautop($content); |
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
/** | |
* Get the colors formatted for use with Iris, Automattic's color picker | |
*/ | |
function output_the_colors() { | |
// get the colors | |
$color_palette = current( (array) get_theme_support( 'editor-color-palette' ) ); | |
// bail if there aren't any colors found | |
if ( !$color_palette ) |
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
/** | |
* Add the colors into Iris | |
*/ | |
add_action( 'acf/input/admin_footer', 'gutenberg_sections_register_acf_color_palette' ); | |
function gutenberg_sections_register_acf_color_palette() { | |
$color_palette = output_the_colors(); | |
if ( !$color_palette ) | |
return; | |
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 text above the loop on the main blog page | |
add_action( 'genesis_archive_title_descriptions', 'add_main_blog_description' ); | |
function add_main_blog_description() { | |
global $post; | |
// Bail if this is an archive page (not the blog page) | |
if ( is_archive() ) |
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 | |
/** | |
* NOTE: We force the full-width content in the functions.php file already; no need to do that here as well. | |
*/ | |
/** | |
* Remove the standard loop | |
*/ | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); |