0

I'm trying to fix with the twenty twelve meta data. I've started fixing and successfully managed to get the date under the title of the post. Please visit my site to see.

  1. One thing I want to do is to remove the footer meta data "This post was posted in..". And instead add:
    A."Comments: #number
    B. "Share this - with the icons inline with comments - Now we have it centered above the comments with the jetpack plugin.

  2. Above the entry title i want do display which category the post is displayed in. So its displayed first with category, then title and last the time.

  3. I also wants configure the time of the day in the time data. So it should be displayed like "16:45 | september 16, 2014"

1 Answer 1

0

If you don't want to use twentytwelve_entry_meta(); in the post loops that calls the date, category and adds that "This post was posted in" text itself, then you'll have to remove it and re-write from scratch.

1A: Comments and Number displayed, refer to the comments_number function: http://codex.wordpress.org/Function_Reference/comments_number

<?php comments_number( 'No Comments', 'Comments: 1', 'Comments: %' ); ?>

1B: If this is coming from Jetpack, it will automatically place them for you. If you want to change where they appear, take a look at this topic: https://wordpress.org/support/topic/manually-inserting-share-buttons

2: To show the current category(ies) that your post is in, refer to the the_category function: http://codex.wordpress.org/Function_Reference/the_category

3: To change the format of the date, refer to the get_the_date function: http://codex.wordpress.org/Template_Tags/get_the_date

<?php echo get_the_date('G:i | F jS, Y'); ?>

As well as the PHP manual for more date options: http://php.net/manual/en/function.date.php

Hope that helps!

3
  • Thanks for the help! I've managed to get the comments part of it and now i think it looks great! I got problem getting the catgory to display over the entry title and to get the time show "G:i | F jS, Y".
    – Earnie
    Commented Sep 17, 2014 at 10:07
  • I've go in to the wp-includes and general-template.php and find three strings with get_the_time which one should I edit? And how to I get it to be a part of my child theme?
    – Earnie
    Commented Sep 17, 2014 at 10:08
  • What file are you editing - I assumed if you were in TwentyTwelve, that you were editing content.php or one of the content-something files? There's no need to go into the wp-includes folder - it is bad practice to edit core files in WordPress, meaning any files outside the theme and outside the wp-content folder in general - whatever changes you make to these files will get overwritten the next time WordPress updates. As far as the date, the function should be get_the_date, not get_the_time. Let me know if you need a code example for what you're trying to achieve and I'll update my answer.
    – RachieVee
    Commented Sep 17, 2014 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.