Welcome to my website and blog. For my first few posts I’d like to explain how I built this site, and thank all of the people who share their code for others to use. Without you this site wouldn’t have been possible.
This site is a Wordpress CMS, and is almost 100% dynamic. When I want to add a new “project” to my photography category, all I have to do is add a new child category and posts to said category and both the project and post will auto appear on the Portfolio page. Inside each post there is a custom field called “orientation” setting that to either “vertical” or “horizontal” will change the layout of the image/paragraph orientation.
The reason I went with the accordion menus was because I never wanted my audience to have to go backwards to get to another category. Sure, I could have used lightbox, but I feel it’s a little overrated and overused, especially for portfolio sites—and even more so for someone who can code. Unfortunately, the accordions caused a few problems.
For starters Wordpress has no true category query, like the posts query. wp_list_categories almost worked, but everytime I used it the thumbnail would appear with the category, but if there was more than one image in each category the cateogry name would appear multiple times.
After painful hours of scouring the internet for a solution I came across this wonderful method. A MySQL call for child categories. It cycles through the database searching for posts that match the query and displays the content requested the php call, in this case the_post_thumbnail. I found this code at Bloggsessive. The original intent for this code was for an category archive list, which in theory is what I was trying to do. I find wordpress so amazing because anything that can’t be done through traditional methods always has another solution.
This blog is still under construction in part, I’m looking to install a good code display plugin. Next post will address the problems I had in keeping the accordion menu open.


