Modest proposal – Improve wp-blog-header inclusion
-
I don’t use WordPress. Yet. I need something that more easily does multiple weblogs (I’m going to call them “channels” from here on) on one page, and I have a suggestion that might help do this cleanly.
An explanation: I would like to have three columns on my site. The center column would contain one or more posts from a specific channel. The left column would contain one or more block areas containing a list of post links. Clicking any post link opens the post as the sole post in the center column. The right side column would contain category listings, calendar, blogroll, etc.
I don’t see any easy way to accomplish separating WordPress categories into separate physical areas as I’ve described. This seems true because the wp-blog-header file constructs the list of posts at the beginning of the page only once for a specific set of options.
My proposal is to dissect the wp-blog-header file into two pieces. One piece would produce a $posts array based on parameters passed into a single function (say, generate_posts()). The other piece would automatically construct the correct function call based on the default settings.
To employ this change to the result in the current default installation’s behavior, a WP user would insert two lines at the beginning of their index.php page in addition to the basic include. The first would construct the corret parameters for the generate_posts() function, the second would be the generate_posts() function itself.
What is the benefit?
The site would behave as normal for users who are used to the current installation.
More advanced users get an additional benefit: Then can re-call the generate_posts() function to get a different list of posts. This would allow a site to display posts from one category in one area, and a different category in a different area.
By using the new 1.2 heirarchy of categories, the top-level category could be used (by inheritance) to determine in what section on the page the post should appear. Logically, I think this holds water because one would segregate categories in a logical way similarly to how one might arrange them for display on a web page.
In all, I think this would be a very powerful feature to add, and would seem not to require a massive writing of new code, but a reasonable modification (by classification) of the existing code. It would also provide the “multiple weblog”/channel functionality that blog tools like MT have been providing all along without adding too much extra complication.
- The topic ‘Modest proposal – Improve wp-blog-header inclusion’ is closed to new replies.