Technology Insights

WordPress NextGen Gallery Simpleviewer: viewer.sfw: Modify Caption Location

I use SimpleViewer to display some of the image galleries on my personal WordPress blog and decided I wanted to change the caption location. Moving the caption to below the image itself instead of below the thumbnails is easy however you must have the source code that comes with purchasing the product. I figure it is worth the money if this is a gallery you are using as it would cost much more in time to develop the gallery yourself.

The default location of the caption is shown below in the image.

Code Snippets

Add Google Content Ads Between Your WordPress Search Results

I have been thinking about the best way to display ads on my WordPress blog search results for a long time because there are numerous options. You could just display content ads at the top, bottom, or both locations, you could add a WordPress plugin, or you could create a custom page with Google custom search results geared for your page. I played around with the latter two options but wasn’t happy with eaither result. One of the ways to do the Google custom search results is using an iFrame and iFrames suck. Anyway I decided to add some custom PHP code to display the ads however I ran into a problem quickly which was the fact that you can only display 3 of the same ad on any one page so if you want to display ads in between each search result it would get a bit more tricky.

Technology Insights

Create a WordPress Template to List All Tags on a Single Page: wp_tag_cloud

Previously I created an article about listing all WordPress tags on a single page however some things have changed since that time. When going back and looking at the article it looks like some of the tags have changed since that time. I do have a WordPress plugin installed called Simple Tags so take that into account when using the below directions. This plugin is recommended to provide you more control over your tags. The easiest way to display all tags is to create a blank WP page and assign a template to it that specifically lists all tags. Follow the below instructions and you will have a page listing all of your tags in no time at all.

  1. Add a Template Page:Add a new page called tag-cloud.php to your server in the theme directory of your WordPress installation. The location of the new file will be wordpress-root/wp-content/themes/theme-name/. You can copy the contents of the page.php file from the default theme or your theme and then make the following two modifications.

Technology Errors

WordPress File Upload Error: The uploaded file could not be moved to

When attempting to upload files via the WordPress admin to your blog you might receive the below error. This error can be caused for a couple different reasons of which the main reason relates to permissions. Resolving the issue is a security risk but depending on how convenient you want it to be to upload files will depend on if you should use the WP admin or if you should just FTP the files to your blog site.

Error: WordPress File Upload Error: The uploaded file could not be moved to /wordpress/root/wp-content/uploads/2009/04

Below I list two different causes and resolutions for each one.

Code Snippets

WordPress NextGen Gallery – Add Date Print Out to Compact Album Listings

I was working on my personal blog and wanted to add the date or a date range to the top of each gallery when they are listed out. The blog I am speaking of uses WordPress, WP version 2.7, with the NextGen Gallery plugin, NGG version 1.2.1, for pictures. I list the all of the galleries by using the album compact function so the below howto relates to that function only. What it will do is simply print out anything in the description field right above the image you have highlighted for each gallery. Since I was not using the description for anything else I just add the date or a date range into that field such as 01-01-2009 or 04-16-2009 to 08-10-2009.  Follow the directions below and you can print out anything you like above each gallery listing.

The NextGen Gallery shortcode used to display the galleries:

php

  1. [album=3,compact]