Issue with number of posts
-
This issue refers to version 1.9 of the plugin. I haven’t done tests with any other setups.
In WP, I had changed my ‘Number of posts per page’ (post type options on top pf the page) setting to 50 because the default 20 items weren’t enough for my usecase. I did this because I couldn’t sort further than 20 items using ‘Post types order’. Click and drag functionality of this module doesn’t empower me (at least, it seems, as far as I could test) to shift an item from page 1 to page 2 and so forth.
Well, changing my WP setting to 50 seemed to solve the issue (I had 25 items to sort in my usecase) as I would be able to freely pull and reorder items. No, the problem, as I found after pulling some hair out of my head, is that I could resort items within the 20 posts per page limit. If I was to pull item from position 25 to position 16, my change would be completely ignored.
After downloading and playing around with the source code to try to sort out the problem, I could solve the issue by changing $objects_per_page to ’50’, instead of the default ’20’ on file ‘cpto-class.php’, line 175. Now the plugin can atually ‘see’ 50 items per page and I can do whatever resort I need. Of course I would have problems if my number of items was to climb to 60.
This was of course a quick and dirty fix, of course, as the problem doesn’t get solved. My best guess is this line 173 should be somehow fixed:
$objects_per_page = get_user_meta($userdata->ID ,'edit_post_per_page', TRUE);
It should pull the number of items per page I have set for the post type being edited.
Please, let me know if this is the appropriate channel for sharing this sort of fix request. I will be eager to help in case you need.
- The topic ‘Issue with number of posts’ is closed to new replies.