Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Plugins
    In reply to: Post enumeration
    Thread Starter moarghorgh

    (@moarghorgh)

    Ah, I got it. Instead of post here:

    $querystr = "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'post' ";

    I just have to write portfolio:

    $querystr = "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'portfolio' ";

    Thank you!

    Forum: Plugins
    In reply to: Post enumeration
    Thread Starter moarghorgh

    (@moarghorgh)

    That’s exactly what I was looking for! It works fine!

    Just another question: I use the plugin More types and your script doesn’t work when I put the code <?php query_posts('post_type=portfolio'); ?> before the loop. Do you know how to change it that it works?

    <?php query_posts('post_type=portfolio'); ?>
    
    	<?php while ( have_posts() ) : the_post() ?>	
    
    		<div class="col1">
    
    			<div id="post-<?php the_ID(); ?>" class="entry">
    
    			<h2 class="entry-number">#<?php echo get_post_meta($post->ID,'incr_number',true); ?></h2>
    
    			<div class="entry-content"><?php the_content('(...)'); ?></a></div>
    
    			<span class="meta-data">
    				<?php the_category(); ?> &bull; <?php sp_authors_display(''); ?>
    			</span>
    
    		</div> <!-- end post-xy -->
    
    	</div>
    
    <?php endwhile; ?>

    Thank you so much!

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