Support » Plugins » Hacks » pre_option_posts_per_page filter example code not correct

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz


    The code example works fine for me. Be sure you provide a category slug that actually exists in your installation. Despite the name ‘category_name’ it is actually looking for a slug.

    It may be your theme or a plugin is overriding the posts per page value so that this filter does not work. Try adding the filter with a larger priority number. If that doesn’t work, it could take some serious digging to find out where the override is happening.

    If you really need to override the posts per page for a specific reason, there may be other ways to try an override that might be more effective, depending on where this is actually needed.

    You’re right. It works now (when I use the category slug). Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘pre_option_posts_per_page filter example code not correct’ is closed to new replies.