WordPress.org

Ready to get started?Download WordPress

Forums

Photo Matt's better archiving (20 posts)

  1. skeen
    Member
    Posted 10 years ago #

    Matt;
    Would it be possible for you to share with us how to create archives like yours? I would like mine to be the same way with the exception of the excerpts, just the post titles.
    For those who dont know: Matt's Archives

  2. lars
    Member
    Posted 10 years ago #

    I'm not Matt, and I don't see any excerpts on that page, but the Wiki page on Template Tags should be a good place to start.

  3. mamabean
    Member
    Posted 10 years ago #

    I would love to know this as well. Been trying to figure out how it can be done and have absolutely no idea.

  4. skeen
    Member
    Posted 10 years ago #

    No, it has nothing to do with the template tags, Matt has modified his blog to do this, I would also like to do this.

  5. Nick Momrik
    Member
    Posted 10 years ago #

    I've gotten my own /archives/ page to work like the page you linked to by doing this. I've also been looking into how to create my own archive pages with excerpts and to have single post pages with the previous/next links at the top (like PhotoMatt). Great question skeen!

  6. Cena
    Member
    Posted 10 years ago #

    MtDew, could you post this to the wiki, here: http://wiki.wordpress.org/index.php/WPHacks ?

  7. Nick Momrik
    Member
    Posted 10 years ago #

    Sure can....Done.

  8. skeen
    Member
    Posted 10 years ago #

    Where is Matt on this thread? Come on Matt, get your butt down here! ;)

  9. Cena
    Member
    Posted 10 years ago #

  10. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Yeah that page is really messed up for some reason. Trying to work with the wiki.

  11. Laughinglizard
    Member
    Posted 10 years ago #

    Fixed wiki page

  12. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    It could just look at the URI.

  13. Nick Momrik
    Member
    Posted 10 years ago #

    Add "|| !empty($category_name)" to the archive check to have the warning about excerpts appear on category archives.

  14. lars
    Member
    Posted 10 years ago #

    When the archived posts are shown, I'm trying to display the month and category as a heading, but for some reason the month won't show.
    This is what I have in index.php, just after the "in archives?" check from PhotMatt Wiki:
    <pre>
    <?php if(empty($cat)){single_month_title(' ');} else {single_cat_title();} ?>
    </pre>
    This works on my local copy, and the only difference is I don't use permalinks there.
    My php skills are pathetic, so if anyone has any idea it'd be much appreciated.

  15. lars
    Member
    Posted 10 years ago #

    I've got it to work replacing single_month_title with this:
    <pre>
    date('F Y', mktime(0, 0, 0, $monthnum, 1, $year))
    </pre>
    F is the full textual representation of a month, e.g. "January".
    I'm still not sure why single_month_title doesn't work though (note also that single_month_title includes the year, which I don't think it should).

  16. FionaGilbert
    Member
    Posted 10 years ago #

    Hi,
    I am trying to use this via the 'Wiki' but I can't quite work the logic out. Quite new to PHP you see.
    What do I actually put in the index.php page to call the arch.php file.
    All I have in the index at the moment is:
    <pre>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <?php if (!$p && !$name && (!empty($monthnum) || !empty($year) || !empty($s) || !empty($m) || !empty($day))) { ?>
    The archive page you are viewing contains only excerpts of each post. To view the full post, click on its title.
    <?php } ?>
    </body>
    </html>
    </pre>
    Thanks
    Fiona

  17. Nick Momrik
    Member
    Posted 10 years ago #

    When I access /, I get the full content of my posts, but when I access /index.php, I get the excerpts. The index.php without anything passed to it is acting like it is an archive.
    Is there an easy way to change the if statements to prevent this?

  18. southerngal
    Member
    Posted 10 years ago #

    I just plopped everything on a page with wp-blogheader.php in it and it's working for me. See?
    Thanks for the code, Matt, excellent! :)

  19. MathiasBynens
    Member
    Posted 10 years ago #

    southerngal > What is the source of your archives.php file? Could you please post it? Or is it the same as Matt's code?

  20. Nick Momrik
    Member
    Posted 10 years ago #

    I've created better instructions for using photomatt's archive style. View them here.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.