Meta properties are giving weird results. Here’s the code. What’s wrong?

[ad_1]

` <meta property=“og:title” content=“<?php the_title(); ?>” />
<meta property=“og:type” content=“article” />
<meta property=“og:url” content=“<?php the_permalink(); ?>” />
<meta property=“og:image” content=“<?php the_post_thumbnail_url(); ?>” />
<meta property=“og:description” content=“<?php the_excerpt(); ?>” />`

When I check the title, url, image and description in my front page (index.php) it’s all populated with the contents from one of my posts. But I am on the front page where I’m just running the loop and displaying all available posts. Is that expected behavior or is there a different way of doing it?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer