inov8ed 0 Report post Posted January 4, 2011 I just noticed that the Previous entries (with or without WP-PageNavi) don't seem to do anything. I am getting exactly the same issue as this post: http://www.pagelines.com/forum/topic.php?id=2078 http://www.inov8-ed.com and http://www.inov8-ed.com/page/2/ Seem to show exactly the same thing. Does anyone have any ideas? Its funny as the navigation seems to work fine when looking at the archives, just not of the main page of the site. Thanks. -Adam Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 4, 2011 Ok, I figured out that it was the hook I was using to remove a category from view on the front page. When I remove the hook, the page permalink issue goes away. The hook I added is: add_action('pagelines_before_theloop', 'exclude_cat'); function exclude_cat(){ if (is_home()) { query_posts("cat=-20"); } } function SearchFilter($query) { if ($query->is_search) { $query->set('cat','-20'); } return $query; } add_filter('pre_get_posts','SearchFilter'); Any idea where I went wrong in the above to lose the page navigation? Thanks! -Adam Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 4, 2011 Interestingly enough, with the above code, it doesn't break the pagination on the search pages. It seems to be something only on the home page. Is there a better way to get a category to not show up on the home page? -Adam Share this post Link to post Share on other sites
cmunns 16 Report post Posted January 4, 2011 It should work fine but you need to modify it a touch to include pagination in the query ` function exclude_cat(){ if (is_home()) { $page = get_query_var('page'); query_posts("cat=-20&paged=$page"); } } ` Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 4, 2011 @cmunns, Thanks for the response. I just tried this and it doesn't seem to change the behaviour. I am still getting the same loop on the other pages. The whole hook looks like: add_action('pagelines_before_theloop', 'exclude_cat'); function exclude_cat(){ if (is_home()) { $page = get_query_var('page'); query_posts("cat=-20&paged=$page"); } } function SearchFilter($query) { if ($query->is_search) { $query->set('cat','-20'); } return $query; } add_filter('pre_get_posts','SearchFilter'); Is that right? Thanks. -Adam Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 4, 2011 Does it matter if the permalinks for the page look like http://www.inov8-ed/page/2/ ? -Adam Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 4, 2011 I wish you could edit your posts after you make them. I meant http://www.inov8-ed.com/page/2/ :-) -Adam Share this post Link to post Share on other sites
cmunns 16 Report post Posted January 4, 2011 Okay try making changing the $page variable to this `$page = (get_query_var('paged')) ? get_query_var('paged') : 1;` Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 4, 2011 That worked and fixed the page issue. However, it did seem to override the magazine style layout settting. It lost the option for full width posts and is now just displaying all the posts as if it was set on the blog page setting. Any way to get that back? Thanks for your help! -Adam Share this post Link to post Share on other sites
Andrew 207 Report post Posted January 4, 2011 gonna take some hacking... the 'clips' are shown according to this function `pagelines_show_clip($count, $paged)` Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 5, 2011 Does this replace the $page variable above or does it replace the entire function? How would it change the whole hook code? Thanks! -Adam Share this post Link to post Share on other sites
Andrew 207 Report post Posted January 5, 2011 hmmm, well the way we're doing this now really messes up the swing of things as it resets the post counter. All this functionality is handled primary by WordPress, until we mess with it. Couldn't you just get a plugin to accomplish this? Share this post Link to post Share on other sites
inov8ed 0 Report post Posted January 5, 2011 Ok. I removed the hook and just tried this plugin: http://ryowebsite.com/wp-plugins/category-visibility/ Seems to work so far. Hides the category and the pagination works fine. It also seems to have some nice features as well (and is WP 3 compatible which most listed on wordpress.org were not). -Adam Share this post Link to post Share on other sites