Support » Plugins » Hacks » A Custom Template Question

  • I’m looking to see if there’s a WordPress plugin that can handle this. I’d be shocked if something exists that handles this completely on it’s own, I figure whatever I use would need some rejiggering. Ultimately, I suppose I could write it all myself in custom page templates, but I’d rather use an existing plugin if I can. No point in reinventing the wheel.

    I’m moving a fan site for the Texas Rangers from Movable Type to WordPress. I had some freaky template work in MT to generate these pages. Here’s what one of them looks like (from Sep 2011):

    The calendar is setup for the season (for the last 3-4 seasons) before spring training starts. It’s all structured such that if the game in question has not played, it shows the Time the game is to be played, but if it has, it uses custom field data from the blog entry for that game, and instead of showing the upcoming game time, it will show the result, with a permalink out to that game’s recap.

    Basically what’s going on here on the schedule page is this:

    It’s an HTML Table formatted to look like calendar
    There’s 7 columns one for each day – Sun – Sat

    * Row 1 is just the dates – 01, 02, 03 of the month. Background colour one or other color depending on home or away
    * Row 2 is the meat and potatoes – details below.
    * Row 3 is a separator for next week

    After Row 3, you repeat 1/2/3 depending on how many weeks are in that particular month.

    In the cell for each day in Row 2, there’s a lot going on. The “game not played” scenario will just print the gametime. However, if the game has a tag of (in this example) 0904, and the category is (in this case) “2011 Game Recaps”, it will then pull other custom data from that entry and print (again for this example) W:11-4 and link back to the permalink for that game’s entry. The system works, so long as I actually remember to put the custom data the right way.

    I basically need to find a plugin that can handle this, or I’ll have to recode the page myself, which I’m not particularly looking forward to doing.

    Anyone have any thoughts on this?

    — Background info:

    This is the Movable Type Template code that does all the work in the cell. Obviously you can’t cut/paste, much less use that code, I only post it as an example of what I did before. Yeah, I know the HTML use of fonts is archaic, but it was one of those things that worked, so I didn’t want to mess with it, know what I mean? 🙂

    <td width="14%" valign="top" align="center" height="32"><b>
    	<font face="Arial" size="2">Red Sox</b><br>
    <mt:SetVarBlock name="output"><b>12:05</b></mt:SetVarBlock>
    <mt:Entries category="2011 Game Recaps">
        <mt:EntryIfTagged tag="0904">
            <mt:SetVarBlock name="output"><a href="<mt:EntryPermalink />"><$MTEntryDataScore$></a></mt:SetVarBlock>
    <mt:Var name="output"></td>

    When I started doing that, I was doing it without the aid of Custom data fields, so some of the stuff is in weird places – like the four digit gamedate was used in the post tag. Given I never used ’em in MT, I took the field for that purpose. In WordPress I imported that data straight to a new custom field called GAMEDATE, which is more relevant.

Viewing 1 replies (of 1 total)
  • Bump. Anyone know of a plugin with WP that might let me pull this kind of thing off? Or is it gonna have to be custom template stuff?

Viewing 1 replies (of 1 total)
  • The topic ‘A Custom Template Question’ is closed to new replies.