• I’m cross-posting so I will apologize in advance – if someone can delete the one in “Plugins and Hacks” that would be great because I think this should not have gone there.

    This is my issue:

    I have a code up on my navigation bar that basically says:

    “I beat my head against this computer screen on Friday, March 16th, 2007 and finally made this post at 6:10 am when I could have been knitting, and then I heaved open the Sleep and Scrapbooking categories, just to make you think I have some organizational skills.

    If you want, you can keep track of what people have to say about my inane wramblings through the RSS 2.0 feed, but I wouldn’t bother, its only my Illusive Life after all.”

    The bold words is the scripted parts…this is the actual code for that:

    ‘ <h3>The Recent Entry </h3>
    I beat my head against this computer screen on <?php the_time(‘l, F jS, Y’) ?> and finally made this post at <?php the_time() ?> when I could have been knitting, and then I heaved open the <?php the_category(‘ and ‘) ?> categories, just to make you think I have some organizational skills. <p>
    If you want, you can keep track of what people
    have to say about my inane wramblings through the
    <?php comments_rss_link(‘RSS 2.0’); ?> feed, but I
    wouldn’t bother, its only my Illusive Life after all.’

    My problem is, it stopped working, and I don’t recall even touching the code other than to move it to a new template -but the thing is I can’t remember where I found this code so that I can even verify that it is all there correctly – I was hoping someone here may be able to tell me what the issue is.

    This little code snippet also seems to have quit working as well:

    ‘<p>There are <?php echo $numposts ;?> posts and <?php echo $numcmnts ;?> comments so far.</p>’

    This is my site if you need to look at it:

    Illusive Life

Viewing 2 replies - 1 through 2 (of 2 total)
  • In your nav bar? I think that first snippet might only work inside the loop.

    I pasted it into my test WP on my local machine, inside the loop, and it worked fine.

    I think $numposts and $numcmnts have to be read from the database before they are available to your code. Is that happening?

    Thread Starter SusanM

    (@susanm)

    how do I find out if it is? It worked before I changed templates so I wondered if the code was incorrect. I did manage to get the first issue working again, but the second issue of the comments so far is still not working…this is in the right side bar:

    ‘<p>There are <?php echo $numposts ;?> posts and <?php echo $numcmnts ;?> comments so far.</p>’

    at Illusive Life

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code stopped working for date, time & categories…’ is closed to new replies.