Query posts, pagination not work
-
Sorry for my english…
I want to query posts from category 69 on main page, and i don`t want them on page with posts, so i add a function:
<?php add_action('wp_head', 'iworks_only_one_category'); function iworks_only_one_category() { if ( is_front_page() ) { global $wp_query; $wp_query->query('cat=69'); $query = new WP_Query(get_query_var('paged') ? get_query_var('paged') : 1); $paged = (get_query_var('page')) ? get_query_var('page') : 1; } if ( is_home() ) { global $wp_query; $wp_query->query('cat=-69'); $query = new WP_Query( get_query_var('paged') ? get_query_var('paged') : 1 ); $paged = (get_query_var('page')) ? get_query_var('page') : 1; } }Everything works fine, but pagination doesn
t work, when i click on "next page" there are samoe posts on every page. I try to solve this problem with some solutions but they doesnt work. Could you help me?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Query posts, pagination not work’ is closed to new replies.