Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter greggor

    (@greggor)

    Wow, I don’t remember the query_posts having had so much power last time i was in there! The issue was having that MYSql query on a template page – – where it would be possible that someone could see it, possibly.

    ANyway this is what works now, thank you for your help!

    <ul id="top-sites">
    				<?php query_posts('meta_key=score&orderby=meta_value'); ?>
    				<?php
    				while (have_posts()) : the_post(); ?>
    				<?php static $count1 = 0; if ($count1 == "10") { break; } else { ?>
    
    					<li><a href="<?php the_permalink();?>"><?php
    				echo get_post_meta($post->ID, 'sitename', true); ?></a> <span class="small">(<?php echo get_post_meta($post->ID, 'score', true); ?>)</span></li>
    				<?php $count1++; } ?>
    
    				 <?php endwhile; ?>
    				</ul>

    Works like a charm, and is so much easier… ??

Viewing 1 replies (of 1 total)