diff --git a/functions.php b/functions.php index 084071a..291656c 100644 --- a/functions.php +++ b/functions.php @@ -28,4 +28,43 @@ if ( !function_exists( 'child_theme_configurator_css' ) ): endif; add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 10 ); -// END ENQUEUE PARENT ACTION \ No newline at end of file +// END ENQUEUE PARENT ACTION + +// modify search +add_filter( 'relevanssi_light_custom_fields', function( $fields ) { return array( '_genesis_description' ); } ); + +// add dublin core metadata to header +function add_dublin_core_metadata() { + if (is_single()) { + $post_id = get_the_ID(); + $author = get_post_field('post_author', $post_id); + $author_name = wp_kses_post(get_the_author_meta('display_name', $author)); + $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 + $rights = 'Copyright ' . date('Y') . ' ' . $publisher . '. All Rights Reserved.'; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } 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 + $rights = 'Copyright ' . date('Y') . ' ' . $publisher . '. All Rights Reserved.'; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } +} +add_action('wp_head', 'add_dublin_core_metadata');