Marc Heatley
Forum Replies Created
-
Forum: Hacks
In reply to: WP_Query based on the current post categories@alchymyth You’re a superstar! I’ve been trawling the codex today for this, was getting dizzy from going round in circles for so long.
Much appreciated.
No problem – sorry for the silly mistake.
RE grouping by date, I wish I did. I’m working on a site for a listings magazine who have multiple events per day and so would love to group by Month and Day.
Hey – so sorry. There’s a typo in my instructions. The class we’ve specified is eventscat-X with an s and the css styles are for eventcat with no s.
Change either and problem solved.
Duuuh.
No problem – the first set of ‘<tr>’ tags in your event format create the table row, so you need to define the class of the row in there. So now your event format will be:
<tr class="eventscat-#_CATEGORYID"> <td> <strong> #_{D d M Y} #@_{- D d M Y}</strong><br/> <i>#_12HSTARTTIME - #_12HENDTIME</i> </td> <td> <strong> #_EVENTLINK</strong><br/> <i>#_LOCATIONLINK</i> </td> <td> <i>#_ATT{Teacher}</i><br/> </td> <td> <i>#_ATT{Price}</i><br/> </td> <td> <i>#_CATEGORYLINK</i><br/> </td> </tr>
Now in your custom CSS settings (I’m guessing that’s what you mean in PlatformPro, but I’ve never used that theme) you need to add a different css class for each category id, so:
tr.eventcat-1{ background:red; } tr.eventcat-2{ background:blue; } tr.eventcat-3{ background:green; }
etc
This will style the whole row of an event in a certain category. You’ll find the category id numbers in your events menu under categories.
good luck.
Hi Saskia – if you format your events listing as I posted above:
<tr class="eventscat-#_CATEGORYID"><td>col 1</td><td>col 2</td></tr>
You can then style each event category accordingly in your CSS.
For example:
tr.eventscat-1{background:blue;}
would give every event in category 1 a blue background.Hope that helps
In your events list format you can call the event category as a class for the table row (if that’s how you’re listing events)
<tr class="eventscat-#_CATEGORYID"><td>col 1</td><td>col 2</td></tr>
This will call give a class of eventscat-1 etc based on the category ids you can find listed in the Events > Categories menu
Hello – any further development on a solution to this conflict? I’m trying to avoid uploading 2 versions of each image.
Forum: Plugins
In reply to: [IntenseDebate Comments] Plugin: Intense Debate Ver 2.9.1 (Fatal Error)Thanks @mccomb
Hi – any movement on removing the “comments closed” content?