I have been building sites with WordPress for about a year now and I love it. I love the versatility that WordPress offers and I have had great success with Search Engine Visibility. I just recently read a great article on how to use custom fields to take your wordpress site to the next level.

I setup a few pages on my site StamfordCTGuide, which one section in particular, hotels. I added a few hotels and ran into some issues of missing images. Instead of adding the missing images image to each custom field entry in Admin. I wrote a little php if statement to check to see if there is a value present, and if there isnt – to show a default “no image available”.

Here is the php that I wrote, its simple – but really my first experience with writing php. I have been doing ActionScript 3 for about 6 months, and the basic principles are the same.


” border=”0″ width=”50″>


Categories: WebWordPress

1 thought on “WordPress Custom Fields and Checking for Values”

Robb · August 30, 2011 at 1:10 pm

Truly inspirational, just like, “This country has come to feel the same when Congress is in session as when the baby gets hold of a hammer..”.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts


Angular JS Magazine on Flipboard

I have been working with AngularJS for about a year now, trying to learn as much as I can about this growing framework. It’s been a wild ride and I’m going to post a summary Read more…

Top 5

Top 5 Articles : Week of November 25

During the the week of November 25th, I really started to dive into Angular JS. My top 5 articles of the week are mainly about AngularJS, an MVC framework by Google. #1 : AngularJS WebInspector Read more…


How to implement Bronto Email JavaScript Conversion tracking in Google Tag Manager

This tutorial will show you how to setup Bronto Advanced JavaScript Conversion tracking using Google Tag Manager. Bronto Advanced JavaScript tracking gives you more visibility to all of the products that customers are purchasing, then Read more…