julie Posted July 20, 2005 Posted July 20, 2005 Hi - I'd like to get a list of my recent entries on my Date-Based Archive Template. I tried copying the code from the main index, but nothing shows up in the actual list. This was the code: ><div class = "recententries"> <h2>Recent Entries</h2> <ul> <MTEntries lastn="8"> <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br> </MTEntries> </ul> </div> I assume it has something to do with the tags, but I'm not sure what I'd have to change. Any tips? Thanks!! Quote
kellybellydotnet Posted July 20, 2005 Posted July 20, 2005 <div class = "recententries"><h2>Recent Entries</h2> <ul> <MTEntries lastn="8"> <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br> </MTEntries> </ul> </div> <{POST_SNAPBACK}> The one thing that I see wrong is that you have the <ul></ul> tags to define a list, but don't have the <li></li> tags to define the list elements. Either take out the <ul></ul> tags or add the <li></li> tags like this: ><div class = "recententries"> <h2>Recent Entries</h2> <ul> <MTEntries lastn="8"> <li><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></li> </MTEntries> </ul> </div> See if either of those work. Quote
TweezerMan Posted July 20, 2005 Posted July 20, 2005 I tested the code on a test weblog I have, and MT does output entries, but it will only display the last 8 entries in the context of the Date-Based Archive the code appears in. For example, if you're using monthly archives, the archive page for June, 2005 would only show the last 8 entries made during the month of June. You might want to consider using the solution I suggested for your category and recent comment sidebar listings in your other topic. By putting your code in an Index template, it would not be evaluated in the date context of a Date-Based archive template and thus would always show your most recent entries. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.