solostream

Category: Code Snippets

How to Customize Multiple Search Result Pages in WordPress

| July 23, 2009 | 4 Comments
In the previous post, we discussed how to hack the search function in Wordpress to have an additional search form that would search  subcategories. Now that you have 2 or more search forms on your site, you might need to customize the search results. Thanks to this solution, I learned how to ... View Post

How to Hack the WordPress Search Function: Search Categories and Child Categories

| July 21, 2009 | 19 Comments
Recently, we had a client who wanted a special recipe search. There were 2 ways to extend the search functionality - manually or dynamically. 1. Search One or More Categories Manually If we want to search one category, we could have used this solution which lets you manually add category numbers to the search function: [Replace ... View Post

How to create a Simple Directory in WordPress using Grandparent, Parent, and Child Pages

| June 4, 2009 | 18 Comments
I wanted to create a simple directory of non-profit organizations. To do so,  I wanted to use pages for the directory, rather than posts so that I could separate the static directory listings from the dynamic blog posts. I didn't want to have to exclude tons of categories from feedburner and the main ... View Post

How to rename widgetized sidebars in WordPress

| November 20, 2008 | 2 Comments
You can manage multiple sidebar widgets in WordPress. To do so, you go to the Widgets page in the Admin, and select the Sidebar you want to manage. If you have 1 widgetized sidebar, the name "Sidebar 1" is not a big deal for managing it. But what if you have 5 or ... View Post

Publishing WordPress posts in two columns

| March 20, 2008 | 30 Comments
We're currently building a site on Adii's Premium Gazette WordPress theme (this is an affiliate link). In my opinion, it's an awesome theme particularly because of the design. However, we installed it on the client's server of choice, and the posts on the homepage just wouldn't update. We tested it out on different ... View Post

Faviconize your WordPress admin

| January 6, 2008 | 4 Comments
The WordPress admin doesn't have a favicon. That means that when you're working with a bunch of tabs open, it's hard to identify which one is for your WordPress admin. Well, Simply Basic has the solution - simply add one line to wp-admin/admin-header.php that calls the favicon of ... View Post

Using PHP to alternate background colors for comments or posts in WordPress

| December 26, 2007 | 21 Comments
Some blogs have alternating background colors for their comments and posts, i.e. a green background for every even comment and post, and a grey background for every odd comment and post. How do they do that? Alternating Comments Styles To alternate comments, add the following code to your comments.php template file, under where it says <?php ... View Post

Giving each comment its own link in WordPress

| November 28, 2007 | 4 Comments
Being able to link to specific comments in your WordPress blog could be very handy. Good comments can really add a lot of value to a blog, and you or others may want to refer to specific comments in your posts by linking to them. In general, comments can be linked to, but to ... View Post

Giving each WordPress post a thumbnail, and display the thumbnail on the home page

| November 21, 2007 | 193 Comments
// You may encounter situations where you need to automatically display a thumbnail or image of some kind that will link to posts. Here's an example of this kind of situation: ... View Post

Hard-coding an SEO friendly title in the WordPress header file

| November 12, 2007 | 5 Comments
The title I am referring to here is the title that appears in the top bar of your browser, and is in betweeen <title></title> tags in your code. Apparently, to make it more SEO friendly, the title of the post or article should appear before the title of your blog, but generally themes have ... View Post
Page 2 of 3123