![]() However, you will surely wish to use your own blog feature image to share on social media. Then various social networks such as Facebook and others will try to guess for which image they should use as the preview for your blog post. Because when you forget to specify an Open Graph image for your blog post. But the social media network is still unnecessarily guessing your blog intent.Īlthough the more concerning question for your blog post is which image better to show on social media when your article is shared on social networks rather than how much the Open Graph is useful to you as a WordPress user. Because it is a standard way for people to use their blog post name in the “title” tag of the post. Although getting search for the title of any blog post is quite meaningless. Then social networks have to guess it from your blog post’s “title” tag within the HTML code. However, to understand this let us discuss it in more detail.īasically, at the time of writing your site blog post if you forget to specify the open graph title for your blog post. Also, there will be no need to correlate, or suppose about the author had what thoughts in his mind at the time of writing article. Therefore the social Networks (such as Facebook) will be able to understand the content of your website blogs rather than just guessing. However, when you describe the characteristics of your blog post. So that they become more understandable to social media platforms like Facebook. Such as a post on your site, and you want to make it richer in the context of social networks. Well, the Open Graph protocol is nothing but an approach that can explain all the characteristics of an object. In this article, we will show you how to add Facebook OG metadata in WordPress themes which will resolve your issues. Now according to the path open content.php and search for entry-header section.Are you facing any kind of difficulty to add Facebook Open Graph Meta Data in WordPress Themes? Facebook is actually smart in pulling in the right data for your posts when they are shared on Facebook. Now look for get_template_part and notice the template path there, in our case the path is: get_template_part( 'template-parts/post/content', get_post_format() ) In TwentySeventeen theme, single.php template is used to display single post. ![]() Let’s say we want to add a user icon before the author name, to do that do the following: We will work on single post page and this is how it looks from the front-end. Let’s see how it works.įirst, you would have to create a child theme before making any changes. This code will display something like this Posted on date by author name with edit button (only if you are logged in the dashboard).īut now most modern themes are using template tags page to handle post meta. Generally, you would find post meta tags in index.php, single.php, archive.php and content template pages. In modern themes post meta are defined in template tags page and called in when required but in some themes you may find post meta is placed directly before or after the post title. Here we will work on a particular theme – in this case the default TwentySeventeen theme, so keep in mind that code and pages may be different from your theme. Customizing Post Meta DataĪs mentioned, the post meta location varies from theme to theme. Now let’s see how you can customize and add post meta. The ideal situation is one in which you would only display the information you feel is necessary. Some may display it before the post title, some after the title and some right after the content.īut too many post meta pieces can mess up the layout. The post meta data location varies from theme to theme. How Much Post Meta Data Should you Display? If you have a blog then you should make sure your post’s meta data is spot on, as this information can help a visitor understand more about the post and it can also help to increase your page views by making your site easier for navigation. The post meta data section contains relevant information of a blog post such as published date, author name, categories, tags and custom taxonomies etc. What is Post Meta Data and How Can it Help my Blog? ![]() In this post, I’ll show you how to display and style post meta data. Or, if you want to view posts of a particular author only, post meta can help you do that. If used properly post meta can improve user experience say a visitor is interested in a certain topic only, then category meta can help them short posts by category so they can view posts on that particular topic rather than see all the posts. It helps in providing succinct meta data regarding your blog’s content pieces. Have you ever noticed a date or category in a blog post? This is what’s called a ”post meta data” – an important part of a blog post.
0 Comments
Leave a Reply. |