ThemeShaper Forums » Thematic

Custom homepage

(9 posts)
  • Started 10 years ago by ableparris
  • Latest reply from Ian Stewart
  • This topic is resolved

Tags:

  1. I've started working on a custom homepage using the code Ian posted the last time he redesigned ThemeShaper.

    So far I've only got one major problem. I've created a new page called home, and have assigned it the custom template. That's fine. But my blog page, which I've designated my post page, is pulling the same custom template and content as my custom homepage.

    Any ideas why? Thanks in advance!

    -Able

    Posted 10 years ago #
  2. Could it be a is_home() vs. is_front_page() issue?

    Posted 10 years ago #
  3. Can you elaborate on that a bit, Ian? Thanks!

    Posted 10 years ago #
  4. I had named the custom homepage file home.php, but just changed it to front-page.php as in the example. Now my blog shows fine, but the homepage is blank.

    Posted 10 years ago #
  5. got it! (although not sure how)

    Posted 10 years ago #
  6. How do you import a custom CSS file for custom template? I need to get rid of the columns for the asides.

    Posted 10 years ago #
  7. It's the filename.

    home.php is a reserved filename. home.php == index.php but home.php will load instead of index.php if it exists.

    So front-page.php: you'd want to add custom content, loops, etc. Right now on ThemeShaper I've got get_header(), a custom array to show the featured item at the top, 3 custom loops, and get_footer() in my front-page.php.

    Posted 10 years ago #
  8. Oh and is_home() is your front page IF you haven't set a static page as the home page. In which case it's the blog page IF you make one.

    is_front_page() is ALWAYS the front page.

    Kinda confusing.

    No static front page:

    ableparris.com = is_home() & is_front_page()

    Static home page:

    ableparris.com = is_front_page()
    ableparris.com/blog or /journal or /whatever = is_home()

    Posted 10 years ago #
  9. You could target body.page-template-front-page-php or (probably easier) trash get_sidebar() in your template. Sometimes I add manually add extra classes or alternate id names in my page templates to make the CSS less of a headache.

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.