How to get post date back
-
Hi. I removed the post date and I can’t remember how I did this. I didn’t do it in my child theme, so I must have messed around in the php. I wanted to hide my metadata tags, but now I want my post date back so that I can style it. Where does the post date live? Could I add code back to the php to display the date? Which php file is the date contained in? Thank you!
-
where is theme specific, so that would help.
having a link to your site would help, too.
I’m using twenty twelve. I created a child theme, but also made edits to some of the original php files.
here is a link to my site: http://intheglow.club/
thanks!
You turned it off with this CSS:
footer.entry-meta { display:none; } around line 160 of your style.css
thank you! I removed that and now have the date back under my post. do you know how i can keep the date (i’d like to put it directly under the post title) but i would like to remove the “this entry was posted in” and the tags that are beneath the post. I only want to display the date. thanks so much!
to get more fine grained than that, you will probably have edit your theme’s single.php file. As you already have a child theme, you can do so safely.
Thank you. This is my single.php… do you know what I move to get the date under the post title?
<?php
/**
* The Template for displaying all single posts
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/get_header(); ?>
<div id=”primary” class=”site-content”>
<div id=”content” role=”main”><?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( ‘content’, get_post_format() ); ?>
<nav class=”nav-single”>
<h3 class=”assistive-text”><?php _e( ‘Post navigation’, ‘twentytwelve’ ); ?></h3>
<span class=”nav-previous”><?php previous_post_link( ‘%link’, ‘<span class=”meta-nav”>’ . _x( ‘←’, ‘Previous post link’, ‘twentytwelve’ ) . ‘</span> %title’ ); ?></span>
<span class=”nav-next”><?php next_post_link( ‘%link’, ‘%title <span class=”meta-nav”>’ . _x( ‘→’, ‘Next post link’, ‘twentytwelve’ ) . ‘</span>’ ); ?></span>
</nav><!– .nav-single –><?php comments_template( ”, true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!– #content –>
</div><!– #primary –><?php get_sidebar(); ?>
<?php get_footer(); ?>
The topic ‘How to get post date back’ is closed to new replies.