Pagination
-
Hi, so pagination inst working on a static front page on my theme.
Looking at pagination and the hungryFEED code as someone who is new to php and web design am I mistaken when I say that it seems that the hungryfeed codes does not use get_query_var(‘page’); and if I wanted to edit to get pagination to work. (only the second page mind you , the first page appears fine), how would I modify it? I tried my luck and ended getting an error so bad WordPress deactivated the plugin o.o.
When I add hungryfeed to a different page it works fine though, however I need it on the static page one of the center pieces which otherwise works great.codeplex:
Pagination Note: Use get_query_var(‘page’); if you want your query to work in a Page template that you’ve set as your static front page. The query variable ‘page’ also holds the pagenumber for a single paginated Post or Page that includes the <!–nextpage–> Quicktag in the post content.HungryFEED:
$pages = array(); $page_num = 0; if ($page_size) { // array chunk used for pagination $pages = array_chunk($items, $page_size); // grab the requested page from the querystring, make sure it's legit global $wp_query; if (isset($wp_query->query_vars['hf_page'])) $page_num = $wp_query->query_vars['hf_page']; if (is_numeric($page_num) == false || $page_num < 1 || $page_num > count($pages) ) $page_num = 1; } else { $pages[] = $items; $page_num = 1; } $num_pages = count($pages);
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
- The topic ‘Pagination’ is closed to new replies.