WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been spending a lot of time the past few months researching on how to create my first theme. That said most tutorials/books only discuss static sites and I want to go about this well prepared. I would like to add a gallery only on my home page. I have already created an HTML5 mockup of the gallery using jQuery so a plugin right now is not an option.

  1. I wanted to know if the best way to execute this is to create a custom page and only code my gallery into it?
  2. Is there a better alternative?
share|improve this question
use is_home() function to check the page is home page or not – Tamil Selvan May 2 '13 at 17:52
up vote 2 down vote accepted

WordPress has rather convoluted logic for front and home page (which often, but not always are the same thing). It depends on your needs what approach is best to take - for example are you making this as theme for private use or public redistribution, do you want page customized completely or just add elements to it.

The documentation materials on this topic are:

share|improve this answer
thank you that helped. No this theme is purely for personal use and is a blog. – Darth_Vader May 2 '13 at 18:49
front-page.php template is simple option for private use (but not recommended for public since it's hard to override). – Rarst May 2 '13 at 18:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.