Update functions.php
Added functions for removing comments feeds from head and removing unneded widgets. Rearranged some items for coherency. No other changes. Signed-off-by: Nicholas A. Ferrell <naferrell@noreply.giteacoffee.emucafe.org>
This commit is contained in:
parent
7bb0e297e1
commit
a2e8f6ca55
@ -30,9 +30,34 @@ add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 10 );
|
||||
|
||||
// END ENQUEUE PARENT ACTION
|
||||
|
||||
// specific functions for Relevanssi Light search plugin, do not use if you are not using the plugin
|
||||
add_filter( 'relevanssi_light_custom_fields', function( $fields ) { return array( '_genesis_description' ); } ); // add The SEO Framework meta description to Relevanssi Light index
|
||||
add_filter( 'relevanssi_light_boolean_mode', '__return_true' ); // enable boolean search mode for Relevanssi Light
|
||||
// modify search
|
||||
add_filter( 'relevanssi_light_custom_fields', function( $fields ) { return array( '_genesis_description' ); } );
|
||||
add_filter( 'relevanssi_light_boolean_mode', '__return_true' );
|
||||
|
||||
// remove comments feeds from head
|
||||
// https://stackoverflow.com/posts/53287745/revisions
|
||||
add_filter('feed_links_show_comments_feed', function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
// remove unneded widget
|
||||
add_action(
|
||||
'widgets_init',
|
||||
function () {
|
||||
unregister_widget( 'WP_Nav_Menu_Widget' );
|
||||
unregister_widget( 'WP_Widget_Archives' );
|
||||
unregister_widget( 'WP_Widget_Categories' );
|
||||
unregister_widget( 'WP_Widget_Media_Audio' );
|
||||
unregister_widget( 'WP_Widget_Media_Gallery' );
|
||||
unregister_widget( 'WP_Widget_Media_Image' );
|
||||
unregister_widget( 'WP_Widget_Media_Video' );
|
||||
unregister_widget( 'WP_Widget_Meta' );
|
||||
unregister_widget( 'WP_Widget_Recent_Comments' );
|
||||
unregister_widget( 'WP_Widget_Recent_Posts' );
|
||||
unregister_widget( 'WP_Widget_Tag_Cloud' );
|
||||
},
|
||||
11
|
||||
);
|
||||
|
||||
// add dublin core metadata to header
|
||||
function add_dublin_core_metadata() {
|
||||
@ -43,7 +68,7 @@ function add_dublin_core_metadata() {
|
||||
$title = wp_kses_post(get_the_title());
|
||||
$date = get_the_date('Y-m-d');
|
||||
$description = wp_kses_post(get_the_excerpt());
|
||||
$publisher = 'SITE NAME'; // replace with your own site's name
|
||||
$publisher = 'The Emu Café Social';
|
||||
$rights = 'Copyright ' . date('Y') . ' ' . $publisher . '. All Rights Reserved.';
|
||||
|
||||
echo '<meta name="DC.title" content="' . esc_attr($title) . '">';
|
||||
@ -57,7 +82,7 @@ function add_dublin_core_metadata() {
|
||||
} else {
|
||||
$blog_title = wp_kses_post(get_bloginfo('name'));
|
||||
$blog_description = wp_kses_post(get_bloginfo('description'));
|
||||
$publisher = 'SITE NAME'; // replace with your own site's name
|
||||
$publisher = 'The Emu Café Social';
|
||||
$rights = 'Copyright ' . date('Y') . ' ' . $publisher . '. All Rights Reserved.';
|
||||
|
||||
echo '<meta name="DC.title" content="' . esc_attr($blog_title) . '">';
|
||||
|
Loading…
x
Reference in New Issue
Block a user