WordPress Attachment Page Template Code Snippets

Date: 15th November 2009 at 4:25 am | Filed under: scripts, wordpress | Author: Sam Burdge | Tags: , , , , ,

I haven't written as many WordPress tutorials as usual lately, as I have been so busy building websites and blogs, so I thought I would take the time out to share a few WordPress codes I have developed recently for attachment page templates and specifically the image attachment page template. The attachment page template is the page that displays a single image when the images link URL is set to 'Post URL'. You can set the image's link URL when inserting a single image into a post, and also when using the gallery shortcode.

The codes in this article are mostly applicable to images inserted using the gallery shortcode as they are most useful for posts or pages that have multiple image attachments. Read more about using image and file attachments.

These template codes can be added to your WordPress theme using the attachment.php and image.php files. If these template files do not exist in your theme you can create them, or WordPress will default to using single.php or index.php to show attachments by default. (See more about template hierarchy).

If you don't want to create a seperate image.php or attachment.php template you can always edit the index.php or single.php files and wrap the attachment specific codes in the is_attachment clause like so:

if(is_attachment()){
//attachment page specific code goes here
}

These php functions are loosely based on code I found in this article: Adding text links to WordPress Gallery by Michael Fields. In this article he provides code examples of how to show previous and next thumbnail links in a WP attachment page. I also made use of this previous-next keys in array function which is infinitely useful!

My first set of functions will return text links for previous image, next image and back to gallery. The functions themselves will need to be added to your theme's functions.php file before calling them in your image.php or attachment.php files. So here we go:
Read on…

Leave a Comment

Bespoke theming for WordPress Arcade sites

Date: 12th March 2009 at 7:00 pm | Filed under: blog, portfolio, themes | Author: Sam Burdge | Tags: , , , , , , , , ,

loopy1loopy2loopy4loopy3

Screenshots from the new Loopy Pursuits Arcade Site.

I have recently entered the world of Arade Website webmastering and, being the WordPress geek I clearly am, have chosen WP as the management sytem to drive my arcade sites. I have developed two new plugins WP Games Embed (released) and WP Mochi (so far unreleased) and launched my first arcade site Zap Gamez.

In the past I have had a fair few jobs designing custom / bespoke themes for WordPress blogs and for sites that use WP more as a CMS. These jobs are where most of my plugins originate from, adding custom features to sites when no existing plugin is available to achieve the same functionality.

My most recent custom theme is for the arcade site Loopy Pursuits, for which the games content is also driven by my two plugins WP Games Embed & WP Mochi. The theme is incredibly simple - no sidebar or nav bar as such, 3 basic layouts - Home page, Category/Tag/Search results page & single page view where the game itself is displayed. Apart from the formatting of the comments there is nothing about the theme which suggests it is wordpress. No 'recent posts','blogroll' or 'tag cloud' or any other content that could be associated with standard WP blog design.

The theme incorporates google advertising interspersed with the content. My approach to google advertising with arcade sites is to use predominantly image ads as gaming is very visual, and image ads seem to sit better within a very image based site layout. I also use the standard approach of identifying key placements for ads, sometimes referred to as 'Hot Spots', which are normally adjacent to key areas of the page, such as navigation, main content (i.e. the game), etc.

During the development of Loopy Pursuits the WP Mochi Plugin has come a lot closer to releaseability. It still lacks an options page which it would definitely need, but it now incorporates the Mochi Leaderboard (score board) using the Mochi Publisher Bridge, it also now has the ability to add entire directories of games automatically too!

If you are interested in getting a custom design for your WordPress blog, or if you want an arcade website set up, or if you are trying to do something different / unusual with WordPress please feel free to get in touch. I would be happy to provide a quote for any such jobs. I have been working with WordPress since version 1.2 and have set up many WP blogs in that time, I have never used a theme by someone else, custom built is the only way for me!

4 Responses to “Bespoke theming for WordPress Arcade sites”

  • Comment by العاب
    Date: April 4th, 2009 at 11:16 am

    look at my site
    its an arcade power by wordpress

  • Comment by GameGag
    Date: June 8th, 2009 at 11:18 pm

    Wow what a great looking theams, please keep up your innovative touch.

  • Comment by EnjoySilk
    Date: September 18th, 2009 at 1:22 pm

    It’s so beautiful theme!

  • Comment by Frank
    Date: January 9th, 2010 at 2:13 am

    Great theme. My site looks great with this. Thanks

Leave a Comment

Growing Userbase for my Simplistix Theme for WordPress

Date: 12th February 2009 at 10:25 pm | Filed under: blog, themes, wordpress | Author: Sam Burdge | Tags: , , ,

After releasing my WordPress theme Simplistix into the wild a few weeks ago I have been very happy, and somewhat surprised by it's popularity. It has received hundreds of downloads from my site and over 700 downloads from wordpress.org in the last 12 days. I knew that there was a niche for simple, text based blog themes as I had seen a few sites such as www.plaintxt.org that are entirely devoted to these type of themes. But, with all the sophisticated and complex wordpress themes on offer, Simplistix feels like quite a humble little theme — perhaps that's part of it's charm.

Anyway, seeing the download stats made me feel curious about who was using the theme. I had already seen it being used on a couple of blogs because, as with most wordpress projects, I had received some suggestions, ideas, support requests and constructive criticisms from members of the wordpress community. I did a bit of further research on google and instantly found loads more bloggers using my theme. The main thing that struck me was the diversity of subject matter that these blogs covered – science, computer programming, economics, movies, music, art, fashion and many more. It was also nice to see instances where people had modified the theme, adding in their own site headers, sidebar widgets, google advertising, etc.

I felt so inspired by seeing all these sites using Simplistix as their theme that I decided to write this post featuring some of my favourites. So here they are:

TOP PICKS

www.flyhypersonic.com – The seatbelt sign is illuminated
www.thewherewithal.org – Blogging about credit, debt, money, economy, theory
nicolasulloa.com/blog – Music, Animation, Graphic Arts and Illustration
www.ianthewebsite.com – If you could be any blog, what blog would you be?
2chicksblogging.com – Blogging for Change Training since 2008
feedingme.com
blog.nakedsteve.com – Oh hey is that a monome?

THE BEST OF THE REST

phoward.com/blog
ponasniekas.nespalvotas.lt
www.bigtechcenter.info
www.bletherskite.com
blog.xieer.com
www.bestmusiccenter.info
www.businesstechnologytimes.com/wordpress
likeitreallymatters.com
hasibul.info/blog

I am planning an update to the theme in the near future where I will add an options menu which will allow you to control colours, fonts etc.

Leave a Comment

Simplistix and 76 Digital Orange Themes Now Available @ WordPress.org

Date: 31st January 2009 at 3:38 pm | Filed under: themes, wordpress | Author: Sam Burdge | Tags: , , ,

My WordPress themes 76 digital orange and Simplistix are now available at wordpress.org. Here are the links:

For some reason WordPress uses my forum username 'sammyb' as the author name for the themes. With plugins it reads the author name from the plugin file, this obviously doesn't work the same way with themes!

2 Responses to “Simplistix and 76 Digital Orange Themes Now Available @ WordPress.org”

Leave a Comment

WP Holding Page Theme

Date: 30th January 2009 at 1:59 am | Filed under: themes, wordpress | Author: Sam Burdge | Tags: , , , ,

The WP Holding Page theme for WordPress is intended for use at times when your site is undergoing maintenance, or is under construction. There are a few themes and plugins out there that also serve this same purpose, the main advantages of this theme are:

  1. Simple basic classy design.
  2. Easy to install & works 'straight out of the box'
  3. Configurable text,colours, fonts and styles via an  Options Page

You can enter you own text for your holding page via the WP Holding Page Options tab in WordPress.

INSTALLATION:

  1. Download the theme from the link at the bottom of this post.
  2. Upload the theme to your wp-conent/themes folder.
  3. Select the theme from the 'Appearance' page in your WordPress and activate it.
  4. Optionally you can configure the theme via the 'WP Holding Page Options' tab under 'Appearance' in WordPress

CONFIGURATION:

You can configure your holding page via the 'WP Holding Page Options' tab under 'Appearance' in WordPress. Here is a list of available options:

  1. Title text
  2. Body text
  3. Text colour
  4. Background colour
  5. Font style
  6. Title size
  7. Text size
  8. Page alignment

Options page screenshot:
options

THEME SCREENSHOTS:

hp1hp2hp6hp3hp4

DOWNLOAD:


4 Responses to “WP Holding Page Theme”

  • Comment by pressitfor.me
    Date: January 31st, 2009 at 3:00 pm

    WP Holding Page Theme | Sam Burdge…

    The WP Holding Page theme for WordPress is intended for use at times when your site is undergoing maintenance, or is under construction. There are a few themes and plugins out there that also serve this same purpose, the main advantages of this theme a…

  • Comment by WP Holding Page | Simple Themes
    Date: February 25th, 2009 at 1:51 pm

    [...] Release Page [...]

  • Comment by Under Construction Themes for WordPress
    Date: September 3rd, 2009 at 7:00 am

    [...] WP Holding Page Release Page [...]

  • Comment by Don’t show your working | Blog Mum | WordPress made easy
    Date: November 27th, 2009 at 1:54 am

    [...] will need: the WP Holding Page theme; the Theme Test Drive plugin, and of course a WP [...]

Leave a Comment