WordPress.org

Forums

[resolved] Displaying titles for Archive Pages and Categories (8 posts)

  1. athique
    Member
    Posted 8 years ago #

    Hi,

    The theme I'm using doesn't give any indication on what results you're looking at. For example, if you've clicked on the archives for June 2007, it just lists posts and doesn't say 'Currently viewing blah blah blah'.

    So what I've done is add a template tag to display the relevant month in the following way in the archive.php file...

    Archives for<?php single_month_title(' ', display) ?>

    That displays the relevant month fine. The thing is, when I view individual categories now, all I get is the 'Archives for' text and blank space afterwards. I'm guessing I need to implement the single_cat_title tag somewhere, but I have no idea where or how.

    Can someone help?

    Thanks.

  2. moshu
    Member
    Posted 8 years ago #

    Just take a look at the "archive.php" file of the default and you'll see how t is done.
    Note: the file is archive.php (singular) - not the archives!

  3. athique
    Member
    Posted 8 years ago #

    Thanks. I took a look and tried some stuff which was obviously wrong as I kept getting errors.

    Could someone show me how it's done please?

    Thanks

  4. athique
    Member
    Posted 8 years ago #

    Bump!

    Anyone?

  5. moshu
    Member
    Posted 8 years ago #

    Paste your archive.php to the http://wordpress.pastebin.ca and post back the URI.

  6. athique
    Member
    Posted 8 years ago #

  7. moshu
    Member
    Posted 8 years ago #

  8. athique
    Member
    Posted 8 years ago #

    Thanks! It worked great.

Topic Closed

This topic has been closed to new replies.

About this Topic