• Hi,

    is it possible to reorder a new post that has been publish to a specific position (i.e. 10th place) after it has been published?

    I would like to hardcode this in the plugin itself, probably in class-reorder-post-within-categories-admin.php, but not sure where exactly to do this. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    is it possible to reorder a new post that has been publish to a specific position (i.e. 10th place) after it has been published?

    sure, however, what happens to the existing post in position 10? Does it move down the rank order and all subsequent posts?

    I would like to hardcode this in the plugin itself, probably in class-reorder-post-within-categories-admin.php, but not sure where exactly to do this. Thank you!

    I wouldn’t hardcode it, as you may overwrite your changes with a subsequent update.

    The ranking is stored as meta field in the post object.

    The post order is loaded/saved in the class admin/class-reorder-post-within-categories-admin.php` lines 402 and 595. This is done with an ajax call. The underlying methods are protected currently, but if you implement a methos to call these via the save_post hooks, I could include this in a subsequent version of the plugin. You can do a PR on the github repo for this.

    Thread Starter Miroslav Zadravec

    (@zadro7)

    Thank you for the answer!

    Basically when a new post is added to a category with an active reorder, I don’t want to add it ranked first, rather I would ignore the ranking of the first 9 posts, add the new one as the 10th post and shift all the posts down in ranks starting from the 10th place.

    What do you suggest?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    What do you suggest?

    as I suggested in previous post….

    The post order is loaded/saved in the class admin/class-reorder-post-within-categories-admin.php` lines 402 and 595. This is done with an ajax call. The underlying methods are protected currently, but if you implement a methos to call these via the save_post hooks, I could include this in a subsequent version of the plugin. You can do a PR on the github repo for this.

    if you code the solution, I can include it in a subsequent release

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Reorder new post on specific position’ is closed to new replies.