•  
Posts Tagged ‘query_post’

A simple way to query posts

By Austin On April 6, 2009 No Comments

Here is a simple way to call query_posts with an array of options. For all options you my use visit: WordPress Codex.

<?php $my_query = array('showposts' => 4, 'post__not_in' => $do_not_duplicate); ?> <?php query_posts($my_query); ?> Click here to continue reading


Can′t add pagination on WooThemes Thick Theme

By Austin On January 17, 2009 No Comments

Everything I have tried has led to nothing. And I have tried six way’s from Sunday to get my main posts to paginate.

example one:

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('offset=1&showposts=' . get_option('woo_other_entries') . '&cat=-' . $GLOBALS['ex_asides'] . '&paged=$paged' ); ?>

example two:

<?php global $myOffset; global $wp_query; $myOffset = 1; $paged = intval(get_query_var('paged')) ? get_query_var('paged') : 1; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query(array( 'offset' => $myOffset, 'category__not_in' => array($GLOBALS['ex_asides'],7,84), 'paged' => $paged, 'showposts' => get_option('woo_other_entries'), )); ?>

example three:

<?php global $myOffset; $myOffset = 1; $wp_query = new WP_Query(); $wp_query->query(array( 'offset' => $myOffset, 'category__not_in' => array($GLOBALS['ex_asides'],7,84), 'paged' => $paged, 'showposts' => get_option('woo_other_entries'), )); ?>

And after those tries, I just can’t get more pages beyond the option’s that I choose, and can

Click here to continue reading


StylizedWeb: query_posts() Pagination Problem

By Austin On November 29, 2008 No Comments

I was having an issue getting my pagination to work on my ShowCase page. I did a quick search and found a good solution. Check out this link, over at Stylized Web. Click here to continue reading