• Resolved Jaja..

    (@jaja-1)


    I’ve got a little problem.

    WordPress isn’t reading the correct template files.
    Also the WP template Hierarchy looks like it should work.

    I would like to change or Edit the single.php for the gallery format only.

    All default code in the theme folder and now i would like to add a different single.php for the gallery format.

    single.php (default for all others)
    single-format-gallery.php (for the gallery format only)

    Problem is WordPress isn’t reading the 2nd single.php file how can i solve this problem?

    I tried single-gallery.php and format-gallery.php both no results.

    Anybody know how to fix it i remember doing this a while ago without any problems.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think you;re confusing custom post types and post formats. Try reviewing http://codex.wordpress.org/Post_Formats

    Thread Starter Jaja..

    (@jaja-1)

    So true!

    Sorry i was sleeping!

    Normally i did this, by default.

    Duplicate single.php and rename it format.php.

    Open single.php and delete all code inside + paste-in code below

    <?php
                $format = get_post_format();
                get_template_part( 'format', $format );
    ?>

    After that you can make format-post-format.php

    Thanks for the heads up.

    No problem. It took me a few minutes to figure it out too. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘TwentyTen not reading post-format templates?’ is closed to new replies.