WPIntell

Source evidence

get_next_posts_link doesn't work w/ this plugin

Featured Post · support · 2014-03-09T19:39:00+00:00

mixedsentiment
lowseverity
0.63relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 31 rows with source links

19.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

25 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
nalin1017 resolved
I believe get_next_posts_link & get_previous_posts_link no longer works on pages using this plugin. Those functions will still grab all posts featured or not… so you’ll end up with an erroneous ‘view older posts’ link where there are no more posts. https://wordpress.org/plugins/featured-post/ ya. thats a bit tricky… actually you should do something like $old_query=$wp_query; $wp_query=new WP_Query(array('featured'=>'yes',...your other conditions...)); ... Your if else and while loop with $wp_query->have_posts(); ....your get_next_posts_link() and your get_previous_posts_link(); $wp_query=$old_query; // restore default query variable; make sure you use $wp_query as wp uses it most for other helper functions if you want to use them

Comments

1 shown
Sovit Tamrakar 2014-03-28T18:32:00+00:00

ya. thats a bit tricky… actually you should do something like $old_query=$wp_query; $wp_query=new WP_Query(array('featured'=>'yes',...your other conditions...)); ... Your if else and while loop with $wp_query->have_posts(); ....your get_next_posts_link() and your get_previous_posts_link(); $wp_query=$old_query; // restore default query variable; make sure you use $wp_query as wp uses it most for other helper functions if you want to use them