solostream

Category: Code Snippets

How to remove the link to parent pages when using wp_list_pages in WordPress navigation

David Stein | July 8, 2010 | 3 Comments
Recently I was working on a client's WordPress website and he made an interesting request, that I am actually surprised we don't see more often. He wanted the top links on his navigation bar to not be live links, and only the sub-pages should actually link to pages on his site. In this case the ... View Post

Automatic Plugin Upgrade broken after WordPress 2.9.2 and some fixes

Rebecca Markowitz | April 28, 2010 | 1 Comment
After manually upgrading one of our client's sites to WordPress 2.9.2. we noticed that the only thing that went awry was the automatic plugin upgrade. WP asked me for the FTP information, and then gave me this error message: Cannot find Content directory (WP-Content) The first solution I found suggested to make sure that all the necessary ... View Post

How to create an archive based on custom fields, not publish date in WordPress

Rebecca Markowitz | April 12, 2010 | 1 Comment
We recently launched a site called theforgottenletters.org, an incredible project dedicated to translating the Holocaust-era letters of Ralph Schwab from German to English. While building the site, we needed to archive the letters based on the dates the letters were written, not when we publish them to the site. First, I tried this ... View Post

How to list Pages with custom fields in 2 columns in WordPress

Rebecca Markowitz | March 22, 2010 | 3 Comments
Recently, I needed to list all subpages of a parent page.  I also needed to display custom fields below each subpage. And, on top of that, the list needed to be 2 columns. I found a solution for simply listing the pages in 2 columns, but it did not suggest how to modify the ... View Post

How to get around WordPress’ limitation on uploading certain file types

Miriam Schwab | March 16, 2010 | 3 Comments
One of our clients needed to upload files via their admin, and kept getting the following error message: “File type does not meet security guidelines. Try another.” This was something new to us, and after doing some research we discovered that WordPress only allows users to upload certain types of files, and any files that ... View Post

Display sticky post and exclude it from recent posts list in WordPress

Rebecca Markowitz | January 11, 2010 | 4 Comments
We were working on a WordPress site that needed to display a sticky post at the top of the blog page with one style, and then below it a list of the most recent posts with a completely different style. I realize that you can just style the sticky post using the sticky-related classes provided ... View Post

How to list the 4 latest posts with only one post per author in WordPress

Rebecca Markowitz | September 14, 2009 | 5 Comments
Recently, one site we were working on needed a sidebar that would show the 4 most recent posts on the site. But here’s the catch: they wanted only one post per author. And, each author had to have the role of “author” as opposed to contributor or admin. The site in question is still in ... View Post

How to Customize Multiple Search Result Pages in WordPress

Rebecca Markowitz | July 23, 2009 | 1 Comment
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

Rebecca Markowitz | July 21, 2009 | 9 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

Rebecca Markowitz | June 4, 2009 | 11 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
Page 1 of 3123