More
    Home Design / Dev Optimizing WordPress Title

    Optimizing WordPress Title

    This might be known to most WordPress developer that sensitive with search engine optimization for WordPress title. But for newbies, this will be useful and should always be taken into account when developing a WordPress theme. Without using any plugin, this hack is very essential.

    By default a WordPress theme will be built with standard title code such as:

    - Advertisement -

    [sourcecode language=’php’][/sourcecode]

     

    This is likely not the best way to make the title visibly friendly to search engine as each pages and post will display the same code for every title. Ideally, they must be custom to each and individual pages or post accordingly how they should be displayed. It is recommended to use such as:

    - Advertisement -

    [sourcecode language=’php’]<?php if (is_home () ) { bloginfo(‘name’); } elseif ( is_category() ) { single_cat_title(); echo ‘ - ‘ ; bloginfo(‘name’); } elseif (is_single() ) { single_post_title();} elseif (is_page() ) { single_post_title();} else { wp_title(‘’,true); } ?>[/sourcecode]

     

    This code will actually display a custom title for each different type of page on your blog automatically. This is the basic of manual coding of optimizing title for WordPress.

    If you’re really considering search engine optimization as high importance in WordPress development, using plugins might be very handy in this situation. Such are as:

    All in One SEO Pack and WordPress SEO.

    - Advertisement -
    Avatar
    WPTidBitshttps://wptidbits.com/
    Owner of WPTidBits. Totally in love with WordPress!

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    110FansLike
    761FollowersFollow

    You May Also Like