Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //свое количество записей в каждом разделе
- function custom_posts_per_page($query) {
- if (!is_admin()) {
- if (is_archive(array('story'))) {
- $query->set('posts_per_page', 6);
- }//endif
- }
- }
- add_action('pre_get_posts', 'custom_posts_per_page');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement