How to get the current page name in WordPress?

Replace this code in title table then show current wordpress page title

<title>
   <?php
   global $page, $paged;
   wp_title( '|', true, 'right' );
   bloginfo( 'name' );
   $site_description = get_bloginfo( 'description', 'display' );
   if ( $site_description && ( is_home() || is_front_page() ) )
    echo " | $site_description";
   if ( $paged >= 2 || $page >= 2 )
    echo ' | ' . sprintf( __( 'Page %s', 'itPixelz' ), max( $paged, $page ) );
  ?>
 </title>

Share this

Related Posts

Previous
Next Post »