Random posting not working
-
I have 100s of articles lined up to be published, and I have the box checked for “Pick Random Eligible Post(s)?” yet, it still publishes things in order. I have v1.83 and have tried turning it on and off again. I’m not sure what the issue is. Any idea what is going on here?
Thank you,
Alexander
-
I cannot tell from just what you provided.
But if there are no eligible posts found and recycle mode is on, APS will recycle the oldest content as new.
Everything is posting just fine and that is not the problem. The problem is that I checked the box in the line labeled:
“Pick Random Eligible Post(s)??If checked, random eligible posts will be chosen.”
and it is still posting my articles in the order in which the posts were added. For background context, I am adding posts, putting them into draft. I have a large backlog of draft posts and I want the order of these to be posted in a random order and not the order in which I added them.
This is an issue because I prepared my articles in a programmatic manner where articles are just slightly different variations of one another for huge chunks, so if it does not post randomly it looks really strange to have my most recent posts be a list of different variations of one another (and I also have these auto-posting to social media as well, so that makes it look odd as well).
Here’s some of the latest bits of the log, if that helps:
2023-11-12 06:22:17?-?DEBUG: processing post How to Handle Analyzing the Current State of an IT Company
2023-11-12 06:22:17?-?DEBUG: wp_update_post Array ( [ID] => 8824 [post_status] => publish [post_date_gmt] => 2023-11-12 14:22:17 [post_date] => 2023-11-12 06:22:17 )
2023-11-12 06:22:19?-?draft POST id 8824 PUBLISHED : 'How to Handle Analyzing the Current State of an IT Company'
2023-11-12 06:22:19?-?DEBUG: wp_next_scheduled for 2023-11-12 06:49:19 America/Los_Angeles.
2023-11-12 06:51:10?-?DEBUG: aps_auto_post_hook triggered, looking for eligible posts...
2023-11-12 06:51:10?-?DEBUG: aps_num_day stats are Array ( [0] => 12 [1] => 29 ) and today is day 12.
2023-11-12 06:51:10?-?DEBUG: eligible posts WP_Query Array ( [posts_per_page] => 1 [cat] => [author] => [post_type] => Array ( [0] => post ) [ignore_sticky_posts] => 1 [post_status] => Array ( [0] => draft ) [order] => ASC [orderby] => rand )
2023-11-12 06:51:10?-?DEBUG: found 1 results.
2023-11-12 06:51:10?-?DEBUG: processing post How to Handle Analyzing the Current State of Your Technology Company
2023-11-12 06:51:10?-?DEBUG: wp_update_post Array ( [ID] => 8826 [post_status] => publish [post_date_gmt] => 2023-11-12 14:51:10 [post_date] => 2023-11-12 06:51:10 )
2023-11-12 06:51:12?-?draft POST id 8826 PUBLISHED : 'How to Handle Analyzing the Current State of Your Technology Company'
2023-11-12 06:51:12?-?DEBUG: wp_next_scheduled for 2023-11-12 07:19:36 America/Los_Angeles.
2023-11-12 07:19:36?-?DEBUG: aps_auto_post_hook triggered, looking for eligible posts...
2023-11-12 07:19:36?-?DEBUG: aps_num_day stats are Array ( [0] => 12 [1] => 30 ) and today is day 12.
2023-11-12 07:19:36?-?DEBUG: eligible posts WP_Query Array ( [posts_per_page] => 1 [cat] => [author] => [post_type] => Array ( [0] => post ) [ignore_sticky_posts] => 1 [post_status] => Array ( [0] => draft ) [order] => ASC [orderby] => rand )
2023-11-12 07:19:36?-?DEBUG: found 1 results.
2023-11-12 07:19:36?-?DEBUG: processing post How to Handle Analyzing the Current State as a Healthcare Provider
2023-11-12 07:19:36?-?DEBUG: wp_update_post Array ( [ID] => 8828 [post_status] => publish [post_date_gmt] => 2023-11-12 15:19:36 [post_date] => 2023-11-12 07:19:36 )
2023-11-12 07:19:38?-?draft POST id 8828 PUBLISHED : 'How to Handle Analyzing the Current State as a Healthcare Provider'
2023-11-12 07:19:38?-?DEBUG: wp_next_scheduled for 2023-11-12 07:50:10 America/Los_Angeles.
2023-11-12 07:50:11?-?DEBUG: aps_auto_post_hook triggered, looking for eligible posts...
2023-11-12 07:50:11?-?DEBUG: aps_num_day stats are Array ( [0] => 12 [1] => 31 ) and today is day 12.
2023-11-12 07:50:11?-?DEBUG: eligible posts WP_Query Array ( [posts_per_page] => 1 [cat] => [author] => [post_type] => Array ( [0] => post ) [ignore_sticky_posts] => 1 [post_status] => Array ( [0] => draft ) [order] => ASC [orderby] => rand )
2023-11-12 07:50:11?-?DEBUG: found 1 results.
2023-11-12 07:50:11?-?DEBUG: processing post How to Handle Analyzing Your Current State as a Financial Services Firm
2023-11-12 07:50:11?-?DEBUG: wp_update_post Array ( [ID] => 8830 [post_status] => publish [post_date_gmt] => 2023-11-12 15:50:11 [post_date] => 2023-11-12 07:50:11 )
2023-11-12 07:50:13?-?draft POST id 8830 PUBLISHED : 'How to Handle Analyzing Your Current State as a Financial Services Firm'
2023-11-12 07:50:13?-?DEBUG: wp_next_scheduled for 2023-11-12 08:20:39 America/Los_Angeles.
2023-11-12 08:21:37?-?DEBUG: aps_auto_post_hook triggered, looking for eligible posts...
2023-11-12 08:21:37?-?DEBUG: aps_num_day stats are Array ( [0] => 12 [1] => 32 ) and today is day 12.
2023-11-12 08:21:37?-?DEBUG: eligible posts WP_Query Array ( [posts_per_page] => 1 [cat] => [author] => [post_type] => Array ( [0] => post ) [ignore_sticky_posts] => 1 [post_status] => Array ( [0] => draft ) [order] => ASC [orderby] => rand )Hmm the log looks correct. APS is querying WordPress for 1 random draft post. How many drafts do you have?
If WordPress is not returning a random post, likely another plugin (such as WPML) is hooking in and changing the query parameters. You can try this code snippet to suppress any filters during the APS query:
add_filter( 'aps_eligible_query', 'change_aps_eligible_query' ); function change_aps_eligible_query( $args ) { $args['suppress_filters'] = true; return $args; }
I have thousands of drafts ready to be posted.
If I plug in that code into the Code Snippet plugin, does that go in the Functions PHP area? If so, should I select: ?Run snippet everywhere, Only run in administration area,?Only run on site front-end, or?Only run once?
- This reply was modified 1 year ago by alexandereasyba.
- This reply was modified 1 year ago by alexandereasyba.
- The topic ‘Random posting not working’ is closed to new replies.