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?
  • 1
    use is_home() function to check the page is home page or not – Tamil Selvan C May 2 '13 at 17:52

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:

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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