tayaigo.blogg.se

Wordpress meta tags
Wordpress meta tags








  1. WORDPRESS META TAGS HOW TO
  2. WORDPRESS META TAGS CODE

But for the sake of simplicity of the tutorial, I have declared it at the top of the page. It might be a good idea to declare that information in a separate file and include that file at the top of the page using php_include().

WORDPRESS META TAGS CODE

The above code will only display information that it finds declared at the top of the page. Now use the following code snippet to display meta tags

wordpress meta tags

You will be able to find the ID of each page in your WordPress administration areaģ. In the example above, I have used two pages – home page and an about page.The home page has an ID 10 while the about page has the ID 17. Please also note the ID Of the page and you need to replace it with the ID of your page for whom you are storing this information. To add more page, copy the array snippet of one page and replace the data. For every page, you have to declare an array as shown in the above example with two pages. This code format is initialized in the head section and it stores information of title, meta description, canonical URL and robots information in a PHP array. 'meta_description' => 'meta description', 'meta_description' => 'Meta description of the page', 'title' => 'The Title Of Your Page Goes here',

  • Now Copy the following code format and paste it in the section of your WordPress theme.
  • We are not going to show meta information without any plugins and the wp_head() call.
  • First of all, please disable all WordPress SEO plugins and remove the wp_head() call from your theme.
  • WORDPRESS META TAGS HOW TO

    I will share how to do this for blog posts later in the article, but first, let’s see how to do it for pages. I will assume you do not have a large number of static pages on your website and most of them are usual blog posts. Show Meta tags without using WordPress pluginsįirst of all, we will learn how to show meta description for static pages. Hence, I had to figure out a workaround to show meta tags without using any WordPress plugins and in this tutorial, I will share how you should do it too. When i removed the wp_head() call, I found that WordPress seo plugin had stopped working. For this objective, I had to remove the wp-head() call from the head section of the wordpress theme. The other day I was working on a project which required the site to load under 2 seconds.

    wordpress meta tags wordpress meta tags

    Whenever there arises the need to use a plugin, I first try to find out if it is possible without a plugin or not. Plugins can sometimes slow down the loading time of your website and hence, it is a good practice to get the job done without using any plugins. Using WordPress plugins is fine but the problem with plugins is that often times, they slow down the site, add unnecessary codes in the section of your website’s theme and call multiple URL’s in the source code, which can cause conflict with other objectives of your website. Yoast SEO is a popular plugin which I use for my other sites. If you are using WordPress as a content management system, there are lots of plugins available to show meta tags. This includes Meta title, meta description, canonical URL and other things. Meta tags are a basic necessity of any website, because Meta tags tells search engines useful information about a particular page.










    Wordpress meta tags