Support » Fixing WordPress » multiple categories not needed, format for only one?

  • As a beginner, I am desperately trying to start out slow, simply staying with the default template (2.0), intending to take no comments, and with a pretty narrow subject area that needs only one category. I was actually able to change the code on my own to eliminate the “categories” section from the sidebar, but it remains under the posts and really looks silly when multiple categories are not required. I have not found the documentation to be very helpful at my level. Is there a not too difficult way to disable the mutiple categories and comments (I know I can just switch that one off, but it still looks awkward after so many repetitions) functions until I may need them in the future. Also, I just installed 2.01, and my posts have no horizontal margins, just continuing on forever, brand new installation with nothing adjusted. I didn’t notice that with 2.00, but I did not do too much testing with it before I removed it for the upgraded version. I appreciate any advice. Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • What you’re looking for is this:

    Posted in <?php the_category(', ') ?>

    in index.php, archive.php and search.php. It’s in the <p class="postmetadata"> element of each template. In single.php look for:

    and is filed under <?php the_category(', ') ?>

    RE: no horizontal margins continuing on forever

    A link to this would be really helpful in working out what you’re describing.


    Very helpful, thank you very much. I did find what you mentioned earlier, but I only worked on it in index.php, and removed too much, also getting rid of the “edit” and “comment” displays (because it was all part of the same “paragraph” so to speak), and something else then inadvertently changed as well. I could have spent a month on it and not succeeded without your help. Thank you again. I believe I figured out the margin problem on my own (, which happened because in effect I typed in one mile-long word. Sorry, I guess I just needed a little sleep first. As long as I have you for a second though, I was also noting that while the date of my test posts was showing up upon publishing, the author name and time were not even though those parameters were set in the boxes to the right of the editing box. I could not find anything about that in the documentation either and it is stumpimg me. Any further thoughts would again be appreciated.

    Your name looks Polish to me (I surely am), but I am not quite certain with the “qui” at the end. Is it? Thank you for your help.

    kostuj, keep in mind the theme and its use of Template Tags define what is or is not displayed on your blog.

    Getting the author name to display is fairly easy. The default theme’s index.php includes the template tag for it, the_author(), but it’s commented out. Look for this:

    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

    and remove the HTML comment tags around the_author() to get it to display:

    <small><?php the_time('F jS, Y') ?> by <?php the_author() ?></small>

    For archive.php and search.php, you’ll have to add it. So look for this line in those templates:

    <small><?php the_time('l, F jS, Y') ?></small>

    and replace it with the one I have above.

    The time, which is normally displayed with the_time(), is a little more complicated since as you see from the lines above the default theme uses this tag but with a format string (‘l, F jS, Y’) to display the day and date of a post, but not the time.

    The reason the default theme uses the_time() this way is the_date() is typically used as a header for a group of posts: it only displays once a day, so if you have more than one post that day, it would not show on the second post (and third, and so on). You can, however, add the time to the format string:

    <small><?php the_time('l, F jS, Y @ g:i A') ?></small>

    Which would show up as:

    February 4th, 2006 @ 2:54 AM

    24h format:

    <small><?php the_time('l, F jS, Y @ G:i') ?></small>

    You can learn more about date/time format string characters here:

    (WordPress’ date/time tags use the same format method as PHP’s date() function.)

    Finally, on that name…………

    Not hard to see why you took it for Polish, what with ‘Kafka’ sitting so heavy on it. But no, Kafkaesquí — accented flair at the end — is in part Hispanic, though mainly it’s a name placed upon me with the intention of providing something totally, and unrelentingly, unique.

    I ask everyone to call me Kaf (K is fine too), but I register with Kafkaesquí (or its ASCII equivalent) on boards such as this because there is no chance on earth anyone signed up with it before I have. Unless they’re insane. :)


    You spent way, way too much time with me, and I am truly grateful. You are a terrific teacher. I am sorry to say that about all I know is golf, but please feel free to contact me through if you think I can help you with anything. Thanks again, and my very best to you.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘multiple categories not needed, format for only one?’ is closed to new replies.