Remove Date From Search Engine
-
Dear All
I want to hide date from search engine.
I use Annina theme (with child theme too).Then I try to add this code to function.php ->
function jl_remove_post_dates() { add_filter ('the_date', '__return_false'); add_filter ('the_time', '__return_false'); add_filter ('get_the_date', '__return_false'); add_filter ('get_the_time', '__return_false'); } add_action('loop_start', 'jl_remove_post_dates'); function my_theme_enqueue_styles() { $parent_style = 'parent_style'; // this is 'annina-style' for the Annina theme. wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css'); wp_enqueue_style( 'child_style', gey_stylesheet_directory_uri() . '/style.css', array( $parent_style), wp_get_theme()->('version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
But the code above doesn’t work.
Can you suggest me some code to hide date from search engine result?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Remove Date From Search Engine’ is closed to new replies.