That’s why we want to present to you this awesome collection of 20 media WordPress themes. However, it becomes more and more difficult to create a really popular news site and promote it on the web. And it is not surprising that media sites are the main ways to attract public attention. The news became a drug, without which our existence is practically impossible. They do all that for one purpose - to find out what happened in the new world, while they were away. Every morning, millions of people turn on their TVs and radios, buy newspapers, and visit news portals on the Internet. We can use the language_attributes filter to add this right to our html tag.The top 20 media WordPress themes will help you create a stunning news portal, TV channel, or video content website and keep it up-to-date on a daily basis. This lets Open Graph parsers read your meta tags properly. ![]() The first function we have to add is one that tells third party services that there are tags other than pure HTML tags within the document. Open up your functions.php file, and scroll down to the bottom. Now that we have this set up, we can actually start adding our code. Keep in mind, this image will be used whenever a post doesn’t have a featured image, so it should be something general, like your site logo. We will be referencing this later, but for now, create a folder called “img” in your theme or child theme’s parent directory and save this image as “opengraph_image.jpg”. The first thing we have to do is make sure that we have a fallback image in our theme, in case our post does not provide a post thumbnail. I’d recommend creating a child theme if you have not already, and adding this code to the child theme’s functions file. ![]() All of the code that we will go over should be added to the functions.php file of your theme, though it can also be placed in a custom plugin. To start off, we will walk through how to add open graph tags to your WordPress site using a couple of functions. You can either do this manually, or use a plugin for more advanced use-cases. In pure HTML, this is open graph tags can be structured like this: Īdding just these few tags will give third party services a lot of data about your page, and will ensure that your article’s URL looks great and is accompanied by all the information readers need.įortunately, all of this data can be accessed in WordPress, so these tags can be added to the head section of each post automatically. However, for your standard blog post, you will probably only want to include some basic information such as title, description, image and URL. The full list can be seen on the Open Graph Protocol homepage and includes fairly esoteric use-cases like video, music, books, and more. There are actually quite a few open graph tags that you can add to the top of your page. So just by adding a little bit of data about the page a user is on, you can ensure that when your URL is copied and pasted into a social feed, it comes along with a custom image, description and more. Some of these platforms have a proprietary way of collecting this information, like Twitter Cards, but most use Open Graph as a baseline for information. After you have done this, various third party services, notably social media platforms, can use this information to display your content in a more meaningful way. Each meta tag follows the same format you assign a “property” a “content” value. This is where information about your web page is stored, not visible to users. In order for Open Graph to work properly, you need to add a few meta tags to the head section of your HTML document. In this article, we’ll walk through both of these methods. You can do this by adding a function to your theme, or by using a plugin that can do the heavy lifting for you. Adding Open Graph to your own site can actually be fairly simple. ![]() If you have ever been browsing Facebook, for instance, and seen a custom thumbnail, title and description called out in your news feed, then you have seen open graph tags in action. In practical terms, this means you can use basic HTML tags to add key information about your posts, which social networks like Facebook, Twitter, LinkedIn and Google+ use to enhance how links to your site are displayed. The Open Graph Protocol is a series of meta tags you can add to your webpage to allow it to become a rich object, used by social media platforms.
0 Comments
Leave a Reply. |