Forums

  • # December 29, 2008 at 3:02 pm

    Hi!

    I want to show all posts in the "Nyheter" category in my Template Page, i´ve made the custom page by doing the standard WordPress template identifier thingy:

    Code:
    < ?php /* Template Name: Nyheter */ ?>

    Works great, then i´ve added the header and all WordPress includes.
    Before the loop i´ve added the:

    Code:
    < ?php query_posts('category_name=Nyheter'); ?>

    Then the standard (not styled yet)

    Code:
    < ?php if (have_posts()) : ?>

    < ?php while (have_posts()) : the_post(); ?>

    ” rel=”bookmark” title=”Permanent Link to < ?php the_title_attribute(); ?>“>
    < ?php the_title(); ?>

    < ?php the_time('F jS, Y') ?> < ?php the_author() ?>

    < ?php the_content('Read more...'); ?>

    < ?php endwhile; ?>

    < ?php endif; ?>

    This will include the posts, but the post as a whole, or rather: all the content shows up, it doesnt break with a "Read more" text as it should, i use the same query post, 100% the same code on the index file and on the index file it works great, but not in my custom page.

    Anyone that know what the problem is? ;)

    # December 30, 2008 at 4:41 am

    Thanks but if i add the:

    Code:
    < ?php the_content('Läs mer...'); ?>

    it still doesnt break of the content

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag