Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function TEST($offset)
- {
- $total_article_query = new WP_Query(array(
- 'category_name'=>get_the_title(),
- 'post_type' => 'post',
- ));
- echo"total articles: $total_article_query->found_posts" . " offset: $offset";
- if ($offset = ($total_article_query->found_posts - 1))
- {
- echo
- $nombrePosts = 1;
- }
- else if ($offset < ($total_article_query->found_posts - 1))
- {
- $nombrePosts = 2;
- }
- echo "nombre posts: $nombrePosts";
- return $nombrePosts;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement