• hello,
    I’m a bit confused on the templates. The index.php template appears to be used for any posting or list of postings. My problem is I want one layout for the home page, and a different layout for a single posting – how can I accomplish this?
    thanks
    Tom

Viewing 4 replies - 1 through 4 (of 4 total)
  • To solve this problem, I use htaccess.
    I use permalinks
    /artikel/%postname% and the last line of my htaccess looks like
    RewriteRule ^artikel/([^/]+)/?([0-9]+)?/?$ /wp1.34/artikel.php?name=$1&page=$2 [QSA]
    so if I view a single page it uses my artikel.php
    HTH

    Thread Starter tdellaringa

    (@tdellaringa)

    Ah, excellent suggestion! It seems to work great. However – now my archive links seem to be mucked up. They now look like this:
    /article/%
    and of course I get a server error. How did you get around that?
    Thanks
    Tom

    Thread Starter tdellaringa

    (@tdellaringa)

    Hmm, sunshine yours did not work for me… I’m not sure what the difference is between the two rules…

    Sorry, when I c&pd my code something got mucked out (%postid%). Anyway, now its fixed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Index (home) page vs. Post pages’ is closed to new replies.