Display today's date below page Title
-
I’m using WP 4.1 on rundown theme. As the topic title says I would like to display the current date right below the page title.
I have this code in my style.css:
.xdate {
text-align: right;
padding: 1px 1px 1px 1px;
}
I have this code in my header.php:
<span class=”xdate”><?php echo date(‘l jS F Y’); ?></span>I would like to move the date right below the Title on my website.
My website name is: https://newspoliticssports.com
My header.php looks like this:
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id=”main”>
*
* @since Rundown 1.6.5
* @update 1.7
*/
?>
<!DOCTYPE html>
<html xmlns=”https://www.w3.org/1999/xhtml” <?php language_attributes(); ?>>
<head><title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;wp_title( ‘|’, true, ‘right’ );
// Add the blog name.
bloginfo( ‘name’ );// Add the blog description for the home/front page.
$site_description = get_bloginfo( ‘description’, ‘display’ );
if ( $site_description && ( is_home() || is_front_page() ) )
echo ” | $site_description”;// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ‘ | ‘ . sprintf( __( ‘Page %s’, ‘rundown’ ), max( $paged, $page ) );?></title>
<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
<meta name=”viewport” content=”width=device-width, initial-scale=1″ />
<meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″><?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id=”wrapper”>
<div id=”header”>
<div id=”header-inner”>
<h1>“><?php bloginfo(‘name’); ?></h1>
<p class=”description”><?php bloginfo(‘description’); ?></p>
</div><?php if ( ” != get_header_image() ) : /* Rundown custom header image */ ?>
<img src=”<?php header_image(); ?>” height=”<?php echo get_custom_header()->height; ?>” width=”<?php echo get_custom_header()->width; ?>” alt=”<?php bloginfo(‘name’); ?>” />
<?php else: endif; ?><?php wp_nav_menu( array( ‘container_id’ => ‘primarynav’, ‘theme_location’ => ‘primary’ ) ); ?>
<div class=”clear”></div>
</div><!–/#header–>
<span class=”xdate”><?php echo date(‘l jS F Y’); ?></span>
any suggestions?
- The topic ‘Display today's date below page Title’ is closed to new replies.