stevemagruder
Member
Posted 1 year ago #
For a category, I set it to super-sticky, limit 1.
The problem is that if the latest post happens to be from that category, this plugin ignores that and goes to the next post from that category and puts it on top.
In my thinking, what should happen is that the plugin sees that the latest post is already from that category and then takes no action.
Thanks,
Steve
stevemagruder
Member
Posted 1 year ago #
On further review, I described the problem incorrectly.
What was happening was that the first post of that category was placed on top, when I was expecting the latest post of that category to show up there. And there doesn't seem to be an option for limiting to the latest post from the category rather than the first.
stevemagruder
Member
Posted 1 year ago #
To give myself a temporary work-around, I bastardized the following SQL in astickypostorderer.php by ordering by post_date:
$c_meta_term_posts_sql = "SELECT ID FROM ".$wpdb->prefix."posts LEFT JOIN ".$wpdb->prefix."term_relationships ON ( ID = object_id ) LEFT JOIN ".$wpdb->prefix."term_taxonomy ON ( ".$wpdb->prefix."term_relationships.term_taxonomy_id = ".$wpdb->prefix."term_taxonomy.term_taxonomy_id ) LEFT JOIN ".$wpdb->prefix."croer_meta ON ( ".$wpdb->prefix."term_taxonomy.term_id = ".$wpdb->prefix."croer_meta.term_id ) WHERE ".$wpdb->prefix."croer_meta.term_id = '$term_id' AND ".$wpdb->prefix."term_taxonomy.taxonomy = '$c_type' order by post_date desc $limiter";