I redesigned my portfolio in summer 2009 using WordPress thinking of the three things mentioned previously. The whole idea was to make it easy to update, offer the content smartly, and present the services provided as a designer, developer, and writer. I wanted to make use of big images and put my design work in the center, featuring big graphical blocks. However, I also wanted to make sure that any new writing gigs got some exposure when they came up, so that was something to consider as well. There isn’t always a graphic chunk to show off, and that means that I couldn’t build it entirely around that.
I leftmy weblog out of my portfolio this time, since it can get a bit crowded. Most of the time I advise against this, but for this particular project it made sense to move the weblog away from the portfolio. My WordPress setup for this project was simple. First of all, I created a category for each type of project I wanted to be able to show off. I began with Design and Writing, but I also decided to add a category for Announcements. You never know. The reason for using categories is that I can easily use conditional tags to check whether something belongs to a specific category or not, and act accordingly.
Each project I wanted to display was a post in one of these categories, never several at once. I also tagged the posts for more sorting, especially with client names and types of gigs, things that may be interesting to query for in the future. The decisions I implemented in my own portfolio will be the basis of the following discussion and examples.
Posts in the Design category will be image-based, featuring a big fat image and some text on the front page. When the visitor clicks the image, they end up on the actual post, which contains more images, perhaps a gallery of elements you’re particularly proud of, and as much text as you want.
This means that you don’t want to show the post heading on the front page, at least not at the very top. You want the image, and text on the image. The solution for this is using custom fields, where you just store the URL to the background image in a custom field, and then query it on listings pages. You can check for what category each post is in listings, hence you’re able to output it differently.
An alternative solution would be to put whatever you wanted to display in listings in the excerpt field, and then use the_excerpt() to output things. However that would mean that you would either have to settle for a linked image only, or that you would have had to hack a lot of HTML code for each post. The whole point is to make updating simple and quick, and you would probably much rather just upload the image and paste the URL in a custom field. Besides, the solution we’re going for lets you output a heading in plain text, and that’s a good thing for search engines in particular. The single post view will use the post_class() styles to make smaller adjustments to the presentation of the projects.
Posts in the Writing category will be text-based, since it makes sense. We’ll output the post title in listings, and then use the_excerpt() to describe the gig in question. Using large fonts, you can achieve the visual style you’re after and make it stand out. You could control the font size and basically all the stylings using the classes that post_class() puts on the containing div, but since you want to use the_excerpt() in this case, you need to have the conditional check for what category the post is in.
Single post view specials for Writing gigs will be controlled with the post_class() styles, just like with the Design category.
This is the default category and the code for this one is the loop you want to fall back on. In other words, if a post is in neither the Design nor the Writing category, this is the code to be used. In short, it’s a pretty basic loop. Since you want to be able to publish full announcements in your update stream, as well as longer ones with a read more link, we’ll use the_content() rather than the_excerpt(). Other than that, there’s nothing fancy here.
Single post view will be similar to the other two categories, but naturally you can add some custom styling to show that it is an announcement. There should be no doubt leftin anyone’s mind that post_class() is anything but a great tool, especially when it comes to sites like this.
These are simple. Just create a page.php template and make it general enough to work with pages that portray your services, as well as contact and other possible information pages. It is easy enough to add some custom styling or even a completely different behavior if you want to, thanks to the Page template features.
Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
This article was sent to us by:
Juwe T. at
05132010
1. Wordpress Plugins and Functions PHP
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved. Partners: Gunblade Saga