solostream

Category: Code Snippets

How to link author image to their previous posts in WordPress

| May 31, 2011 | 3 Comments

It seemed so simple and straightforward to link an author's image to their page of previous posts like http://wpgarage.com/author/Rebecca/. But for some reason I couldn't find the solution easily with the default WordPress template tags. Template tags that I had used last time I needed this functionality were deprecated.

... View Post

Allow Editor access level to add users in WordPress

| May 29, 2011 | 1 Comment
Recently, a client asked us to allow editors to add users on their WordPress site. They wanted this feature so that the site managers wouldn't be tempted to click on any of the settings, and possibly mess something up. I know this is super specific but it did come up for us so maybe ... View Post

The ultimate guide to embedding HTML and iframes in WordPress – part 2

| April 7, 2011 | 5 Comments
Recently, I wrote about how WordPress users can easily add media like YouTube videos to posts and pages by just inserting the URL of the page the media is on. But that functionality was limited to sites that are oEmbed providers. ... View Post

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

| July 8, 2010 | 19 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

| April 28, 2010 | 2 Comments
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

| April 12, 2010 | 2 Comments
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

| March 22, 2010 | 5 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

| March 16, 2010 | 4 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

| January 11, 2010 | 6 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

| September 14, 2009 | 7 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
Page 1 of 3123