www.webdeveloper.com
Results 1 to 9 of 9

Thread: php wordpress wp_get_archives

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Posts
    46

    php wordpress wp_get_archives

    Hi,

    Not sure if this is the appropriate place to ask this.

    I have a blog using wordpress. i have customized it quite a lot and continue to do so. I am currently using the function wp_get_archives to get the number of posts created in each month. However i want to format these results on my blog in another way rather than just a list etc.

    currently the output is:
    <li><a href='url' title='May 2008'>May 2008</a>&nbsp;(3)</li>

    I would like to be able to parse this output and then print it in a different format. I am having a tough time knowing how to parse the output.

    Any info would be great, preferably using php.

    cheers

  2. #2
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    Can you expand a bit more on how exactly you would like to display your archives? I may be able to help you...

  3. #3
    Join Date
    Jan 2006
    Posts
    46
    Thanks Jick,

    So my ultimate goal is to create a table for each calendar year.

    For 2007 the table will have 2 rows and 12 columns. Row one will contain Jan, Feb, Mar etc and row two will contain the number of posts for the month in the cell above it. Both the month and the number of posts will be clickable.

    Then underneath this 2007 table i will have a 2008 table.

    Each table will span the column with of my blog which is about 900 pixels and the height of the table will be about 80 pixels

    Thanks again

  4. #4
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    Shoot! I'm so sorry I didn't get back to you. I totally forgot about this thread. I just now noticed it again.

    Would you mind making a little image which illustrates what you want? Even something as simple as a BMP from Windows Paint that you throw together real quick or something. Or even a mock-up HTML file if you want to go that far. I just want to be sure what exactly you're going for. I think I might get what you're saying but I just want to be really sure.

    Sorry again...

  5. #5
    Join Date
    Jan 2006
    Posts
    46
    No problem Jick. It is the holidays after all!!

    So i have attached a jpg of the table. Of course i will end up creating some css for it to make it fit in with my blog, but for now this is the basic style i am looking for.

    test.JPG

    thanks again

  6. #6
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    OK! I see what you mean. I'm gonna do some testing to see how I can get that to work. I think I have an idea. Usually I'd just be trying to explain to you how to do it but in this instance I think it might be better for me to figure it out and then try to explain how I did it. I'll post back when I have something. Shouldn't be too long.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles