• Hi everyone,

    I have four languages on my blog, this works without any problem. I just created a category per language. These categories are published on theire own page. So i also have four pages. You can simply create a new template for the page.php so every page with it’s own language has it’s own header in that language.

    However, when the visitors clicks on a headline it will always use the same single.php thus that page can only be one language..

    Is it possible to have multiple templates per single.php just like page.php has?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ic3y

    (@ic3y)

    I just found this:

    https://codex.www.ads-software.com/Category_Templates

    Iam going to check if it works. If it does, WP is even better than i already thought.

    Other suggestions are still welcome in case it doesn’t work ??

    Found the solution together with ic3y. For everyone else with the same question here is how we did it.

    Duplicate your single.php, call it single1.php. Edit the original single.php to something simular as this:

    <?php
    $post = $wp_query->post;
    if ( in_category(’11’) ) {
    include(TEMPLATEPATH . ‘/single2.php’);
    } else {
    include(TEMPLATEPATH . ‘/single1.php’);
    }
    ?>

    In this example, if a certain post is created in category 11 it will load single2.php (you can create anything you want for that page). If it’s not 11 the script will go to single1.php you’re original file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple single.php’ is closed to new replies.