Meta Description/Excerpt
-
I need to add a condition for “pages” here. What is the best way. I want a “page” to display the excerpt just like a single post.
<?php if ( (is_home()) || (is_front_page()) ) { ?> <meta name="description" content="" /> <?php } elseif (is_single()) { ?> <meta name="description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>"/> <?php } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Meta Description/Excerpt’ is closed to new replies.