• Could someone please help in adding time and dates to my posts. I’m using Twenty Eleven V3.2.1. I suspect I’m going to have to add code and would love some help with this please. Thank you! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • in Twenty Eleven, posts show the date already – do you want to expand this to show the time as well?

    this is all in functions.php – function twentyeleven_posted_on()

    try and change this line esc_html( get_the_date() ), for instance to esc_html( get_the_date().' at '.get_the_time() ),

    it is strongly recommended not to edit twenty eleven directly, but to create a child theme and make the edits in there.
    customisations of twenty eleven will be overwriten with the next upgrade of your wordpress version.

    Thread Starter Julie

    (@azurablue)

    Thank you once again alchymyth! I’m new to wordpress, and I’ve worked well with it so far. It’s relatively easy to use, and one of the easier editors by far! I’ve noticed both date and time aren’t showing on my posts, although I’m happy to go without time at this point. Here is a link to my site, so you can see. https://souloftruth.com/SoulWhispers/?page_id=41.

    Whilst I have you, such a simple thing yet I can’t figure it out… how do I add another post to a particular page where there’s other posts? I’ve tried the most obvious.. and selected “add new post” on the page I want to add another, yet when I’ve previewed the addition, it’s showing as “uncategorized”.

    Thanks for your help and patience so far! ??

    you seem to be working with pages (not posts) which don’t show the date;

    in content-page.php find this section:

    <header class="entry-header">
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    	</header><!-- .entry-header -->

    possibly change it to:

    <header class="entry-header">
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    		<div class="entry-meta">
    		<?php printf( __( '<span class="sep">Posted on </span><time class="entry-date" datetime="%1$s" pubdate>%2$s</time>', 'twentyeleven' ),
    		esc_attr( get_the_date('c') ),
    		esc_html( get_the_date().' at '.get_the_time() )
    		); ?>
    		</div><!-- .entry-meta -->
    	</header><!-- .entry-header -->

    Thread Starter Julie

    (@azurablue)

    Thank you, I’ll try that now. And with pages Vs posts, I’m more confused now. I’d like to add posts to each of the pages I’ve set up, but in post order and view. How is this possible? I’ve set up 1 category so far, but it doesn’t show on the menu bar. What I seem to want to do, just isn’t turning out to be that simple :/

    Thread Starter Julie

    (@azurablue)

    Okay, I’ve worked out quite a bit so far just playing around in admin. I love this set up with the date and links https://souloftruth.com/SoulWhispers/?cat=3, however I’d love to link this page and the categories at the side, to the pages in the menu. Is this possible? Also, note the URL.. it’s not the main page, so when you go to home or about, you can’t get back to categories or posts without going through admin. Really sorry to be a nuisance, but I’m a quick learner ;). Thank you! ??

    Thread Starter Julie

    (@azurablue)

    As a matter of interest for anyone new to blogging, and wanting to know the answer to some of my queries, I’ve discovered some really helpful wordpress info pages FYI.

    https://codex.www.ads-software.com/Pages
    https://codex.www.ads-software.com/Administration_Panels
    https://codex.www.ads-software.com/Creating_a_Static_Front_Page

    Thank you again for your time and help alchymyth. I realise now, how big a question some of my questions were ;). I’ve bookmarked this page for future reference of suggestions you’ve made ??

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding time and date to posts on twenty eleven template’ is closed to new replies.