• I want to place a jQuery caroussel on the homepage.
    I’m building a child theme on the TwentyTen theme.
    What is best practice?

    1) Add “if homepage then…” to the header.php?
    2) create a different page. Something like “template-home.php”?
    3) Another way?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Personally, I prefer the custom template approach (the template front-page.php will be used by your front page automatically) but I think that’s just a matter of taste. There’s no best practice approach that I know of.

    in my opinion, any repeated segments of the site should be made into separate files if possible and then included in the template file.

    for example, calling on your carousel would be…
    <?php include(TEMPLATEPATH . '/carousel.php'); ?>

    where carousel.php is in your theme folder and has just the carousel code in it.

    Thread Starter Theo

    (@theow)

    Thanks for the quick answers!

    @esmi Being new to WordPress I didn’t know the existence of front-page.php.
    I think that’s the way to go for me.

    @lukeshumard The carousel is not a repeating segment. I only want to use it on the front page. That is why I rather not use a if … then, because it is only true on the front page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Best practice – Caroussel on the home page’ is closed to new replies.