Support » Developing with WordPress » Index page with daily archive separator

  • I’d like to code my index.php so it returns the set number of posts but with separators between days. I post multiple times per day. I’d also like to have a link on the separator linking to that day’s archive permalink.

    It sounds more complicated than it is. Here it is in action on a “Manila” board: (“Doc Searls Weblog“)


Viewing 12 replies - 1 through 12 (of 12 total)
  • This is actually fairly common and found in many WordPress Themes. I’m hunting for an example but I’m on the road traveling so you or someone else might find it faster. You may also try this bit of code example and I’ll hunt for more.

    Here are some more resources for the answer:

    Posting the same day with date displayed for each post.

    I’ll keep looking later to find a Theme with that specific layout. Anyone else know of one right off the top?

    Lorelle . . . thank you so much for paying attention to my issue! I am very excited to hear you say there are themes with this function. I can’t find any myself. How could i incorpoate the post_groupby into my index template to return a date and then all posts from that date under it? And so on?

    The classic theme is just doing it out of the box.

    Kool, I’ll check it out.

    Awesome! I got it working for me ALMOST perfect:

    Riley Central

    What I need now to fulfill my dream 🙂 is to have a link next to the date that will take you to that day’s archive page. Any idea on how I can finish up this idea? The example i gave a screen shot of earlier:

    Has that link over to the right in a small page icon at the end of the date bar. My calendar takes me to a particular day’s archive. If I could get the day’s link I just added to do that, this idea would be complete! Thanks in advance.

    A new day, more concise question:
    If you look at the “date bar” in this screenshot you will see a small page icon to the right. Clicking on that returns the daily archive of that date. How do I get that on my site.

    Thanks so much to Lorelle and moshu

    That “look” of the arrow next to the post title or the page icon to the right of the Date?

    Both are easily added by adding the image to the link. There are a variety of ways to do this. The most simple method is to add the image within the link and style it with some CSS.

    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?><img src="/images/pageicon.gif" alt="page link to date" class="date-title-right" /></a></h2>

    Something like that would work.

    Or are you talking about creating a date archive?

    Hmm, I think you can do that using the date.php template page as described in Template Hierarchy and is similar to Category Templates and Creating an Archive Index.

    Hi Lorelle. Thanks so much. What I want is the little icon to only appear where the date archive appears. just as the date archive is only returned for the first post, i want the icon to only appear. If you look at my site right now you can see your help got me closer but I need 2 things:
    1. the icon on the same line as the day archive (green)
    2. For it to only appear on the first post of a new day.

    This is what I have observed on the manila blog I referenced earlier. Anyway, can you help me? I’ll leave it messed up like it is so you can see what I mean. I really appreciate your help. I am learning tons here.

    Control over the placement of the icon is through the CSS styles. Set that style to include the image alignment to the right.

    But you have bigger problems. You’ve either removed or didn’t pick up any of the DIV nor spans required to associate the styles with the HTML. You’ve also put in archaic font colors and code which must be removed and put in the stylesheet.

    Go back to the original sources of the code and copy them, including the DIV wrappers which include CLASS and ID identifiers. In the styles.css file is the place to change the color, alignment, and placement, not the template files.

    I know you want your web design to emulate another design, and you want it to look a particular way, but you are delving into places where, if you really don’t know how to do this, you are going to waste more time, energy, and money poking and prodding this.

    I recommend you take this very slow and carefully, and get personal help from someone familiar with web design close to you.

    Or go carefully through the WordPress Lessons in the WordPress Codex, the manual for WordPress users, to figure out how to do this.

    Have you contacted the designer of the site you want to emulate for their help?

    Lorelle, hey that’s some great advice. Thanks for giving it! I have a working model now — albeit non-CSS. It works fine for what I am doing but I do need to go back and recode the CSS.

    I KIND OF know what I am doing. Each day I know a little more. I am very thankful to you for the example you gave on how to post a day heading. As you can see at my blog I have that linked to the corresponding day’s archive.

    Now I will get into the codex tutorial as well as changing the CSS. Have a great day.

    Okay, so I gave up on the idea. In the future . . . if anyone who has a strong knowledge of themes and CSS wants to work on developing one with me, I think it would be truly helpful to the community and if you authored it, you could get a lot of publicity for your work.

    Here’s my post about the end of this project at my blog.

    Lorelle i appreciate you trying to help me. As I said, I learned some things from your posts. I mostly learned to cool my jets on inserting archaic HTML into WORDPRESS php.

    Hope to speak with you again down the road. What do you think of my theme I have added (it’s hopefully up to par 😉


Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Index page with daily archive separator’ is closed to new replies.