How to create a grid discussions list
I am interested in creating a discussion list that has a grid presentation for specific categories - few discussions per row with the same row height for each row and the same width for each column (obviously limiting the info on each "cell"). I'm thinking of having three or four items per row.
I know how to create a border and background for the current one-discussion-per-row forum and how to add/remove information in the meta. Where I fall short at the moment is how to place multiple discussion entries per row. I don't know if it can/should be done in a CSS or programmed in a plugin. I'm pretty sure I'll need to write a plugin to limit this to selected categories.
Help/advice is appreciated.
Best Answer
-
hgtonight MVP
The discussion list is an unordered list by default. Set the list items to "display: inline-block;" and give them a set width. That will give you a grid to style as you please.
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
6
Answers
Regarding the grid discussion list, I have done this for a theme I am working on. It only happens for certain categories. I achieved what I wanted by using the IndexDiscussionImage plugin to give a thumbnail to each post and then styling the rest using CSS. I didn't have to write a plugin to limit it to selected categories. Instead I just referenced the class name given to the body tag for those categories.
Thank you !
It never crossed my mind to look at that plugin because my forum discussions seldom have a picture/image attached. I will look into it and post my results here.
Sorry to report that this plugin does not provide the solution I was seeking - it merely puts a picture on the right side of each row of the discussion list.
What I am looking for is a grid/table with 3 or four columns and rows with fixed height (per row) where each cell represents a single discussion.
Try the CategoriesBg plugin...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@rbrahmson I think my mention of the plugin wasn't quite clear. I was creating a visual grid of posts. All the plugin did was add an image for me to use in the grid. The actual grid you want to create can be completely achieved with CSS. No plugin is needed. My theme is still a WIP but for reference, this is what my "grid" looks like: http://imgur.com/YwIBbF9
The discussion list is an unordered list by default. Set the list items to "display: inline-block;" and give them a set width. That will give you a grid to style as you please.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Thanks for everyone's help. @hgtonight's response seems the easiest to implement and with my recently acquired skills can be turned on and off easily (hijack replace;-)