• Resolved h2orange

    (@h2orange)


    How can I do this? I imagine I need to make a change in the loop, but cannot find where. Thanks so much.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You’ll want to use the_date template tag, instead of the_time (or whatever you’re using currently).

    Thread Starter h2orange

    (@h2orange)

    Thanks… where in the loop do I make the change, however?

    Depends on where you want it. 🙂

    Usually, if I’m using the_date, I put it above the post (in most templates, div class=”post”), or just after the start of the loop, but that’s more personal preference than anything else. Just remember, wherever you put it, it’s only going to appear once for each date, so if you have it at the end of the post, it might not make logical sense to readers.

    Thread Starter h2orange

    (@h2orange)

    I’m running K2. Does that make a difference? Every time I make a switch, all that remains is my header… I imagine I must delete something to balance the addition of the_date, but having a tough time finding what to get rid of…

    I’ve never tinkered with K2 before, so I just did. 🙂

    Putting <?php the_date(); ?> JUST after

    if (is_single()) include (TEMPLATEPATH . '/navigation.php');
    ?>

    seems to work. Of course, to style it, you’re going to need to wrap it in a tag to style… so you can make it <div class="thedate"><?php the_date(); ?></div> and then add a div.thedate style to your style.css.

    Thread Starter h2orange

    (@h2orange)

    Thanks for all your help.

    So I’ve just tried this, and the result leads me to believe that something else is to blame, as I’ve gotten the same tired old result… Only my header loads.

    Any idea why? This has apparently worked for you, but all that I get is a header adding the code anywhere…

    Honest truth? I’d have to see your site, and likely have to see your templates to really have a running start. As that’s kind of hard to do, here’s some things you can try.

    I’m guessing you’ve made other edits to theloop.php – backup your edited copy, then grab a fresh copy of the default that comes with the theme, try just the_date… if that works, then there’s some other edit you’ve made that’s conflicting. From there, you can start making the edits again on the new copy, or you can just try to figure out where the conflict is between the two files.

    If that doesn’t solve it, my next guess would be a plugin that you’ve installed that doesn’t like it… try deactivating your plugins and one by one activate them again.

    After that… well, I’m stumped.

    Thread Starter h2orange

    (@h2orange)

    Great logic… So it works with you WITHOUT removing any other code? Hmmm… it must be a plugin as it still doesn’t work woth the fresh copy.

    The domain is LessPopular.com, but I’m using the registered only plugin at present.

    I’ll look at the plugins…

    Yeah, I didn’t remove anything from the base theloop.php, just added in the_date tag. Worked fine for me, but I don’t have any plugins installed on my test environment either.

    Thread Starter h2orange

    (@h2orange)

    Alright, so I was finally able to get this to work. I really owe you a big thanks, FruitFly, as you were as persistant as a fruitfly in helping me through this. I had to do a bit more than you to accompplish this, however.

    1. I cut “else” text from the Dunstan’s Time Since plugin line. Cut “else” as well as the text the follows including “the_time.”

    2. Place the_date in it’s own div on the line below
    <div id=”post-<?php the_ID(); ?>” class=”item entry”>

    Done deal.

    Glad to know you’ve got it working… and what can I say? I’m stubborn. 🙂

    Thread Starter h2orange

    (@h2orange)

    hehehehe… thanks so much.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Want date to appear once per group of posts per day.’ is closed to new replies.