Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 20 hours ago. Improve this question I want to display the long description of a product as the meta description in the header. This is the first option I used and the excerpt code worked perfect. <head> <meta name="description" content="<?php $excerpt = ''; if (has_excerpt()) { $excerpt = wp_strip_all_tags(get_the_excerpt()); echo $excerpt; } ?>"/> But I want the long description to be displayed so I changed to this but it does not work. <head> <meta name="description" content="<?php $description = ''; if (has_description()) { $description = wp_strip_all_tags(get_the_description()); echo $description; } ?>"/> </head>