• Resolved kazie

    (@kazie)


    So i have a custom post type called “produkter_original”. Everything seems to be working out except for one part.

    I want to display all the posts from “produkter_original” in a menu above the page content.

    I can display all posts by putting this right under <body>

    <?php query_posts(array( 'post_type' => 'produkter_original', 'order' => 'DESC', 'orderby'=>'menu_order', 'showposts' => '999' )); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> | 
    
    <?php endwhile; else: ?>
    Inget inneh?ll...
    <?php endif; ?>

    … But once i go to one of the posts, all the posts are being displayed on the template page.

    If i put the above code in my footer, only one post is being displayed on the template page. Andy idea what’s wrong here?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with displaying custom post types’ is closed to new replies.