... not on any subsequent pages.
I've created this function:
function post_pick() {
global $post;
$filename = "picks/list/$post->ID.txt";
if (file_exists($filename)) {
$pick = '<font color="green"><strong>PICK!</strong></font>';
} else {
$pick = '';
}
retu $pick;
}
Which is called via this CV filter:
add_filter( 'pt_cv_meta_field_html', 'pick_meta_field_html', 100, 1 );
function pick_meta_field_html( $args ) {
$args[] = post_pick();
retu $args;
}
It adds the word 'pick' to the content views meta fields custom data if the post ID is listed in the directory picks/lists/.
It works fine when the first page in a paginated list is viewed but doesn't show up on pages 2, 3... etc.
I've tried to work out why but I failed. Can anyone offer a solution?
thanks
https://wordpress.org/plugins/content-views-query-and-display-post-page/
WordPress ...
ما را در سایت WordPress دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 502
تاريخ: يکشنبه
7 شهريور
1395 ساعت: 7:39