Title: Change position within node/level
Last modified: April 10, 2021

---

# Change position within node/level

 *  Resolved [Radovan Smitala](https://wordpress.org/support/users/adorei/)
 * (@adorei)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/change-position-within-node-level/)
 * Hi,
 * I really like this plugin, because it allows in an unobtrusive way to sort pages.
 * What surprises me is, that when I change the position of one page on a specific
   level, it changes the position for all pages.
 * Is there any option for how to lock moving positions between pages on a specific
   level?
 * Lets imagine I have:
 * – Page 1
    — Page 1.1 — Page 1.2 — Page 1.2.1 — Page 1.2.2 — Page 1.3 – Page 2–
   Page 3 – Page 4
 * So when I want to change position for Page 1.1 (level 2) as the last item I am
   changing menu_order only for all children of Level 2.
    Locking should work like
   it doesn’t allow me to move page out from node/ scope.
 * From my point of view. menu_order is always unique based on nested level. So 
   it is a combination of post_parent and menu_order.
 * Just example, when I want to get children for Page 1.2, then menu_order for first
   child is 4, not 1 or 0 as default.
 * Eg: For hundreds of pages, I have menu_order as is the default for WordPress,
   but I want to change menu_order for one small node, and voila, I got recalculating
   for all hundreds of pages.
 * It is similar behavior as moving items position for the menu.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [5 years ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-14424390)
 * Hey [@adorei](https://wordpress.org/support/users/adorei/) !
 * Thanks for your message, and apologies for the delayed response.
 * > From my point of view. menu_order is always unique based on nested level. So
   > it is a combination of post_parent and menu_order.
 * Unfortunately, this is not correct. WordPress uses a flat `menu_order` here, 
   that means if you change the `menu_order` for a page which is outside the scope(
   e.g. after `Page 3`) but is still a child of `Page 1`, it is simply moved after`
   Page 1.3`. You could test this with the `Order` input in **Quick Edit**.
 * But I understand your issue. It should be normally work this way: When I drag&
   drop after e.g. `Page 3`, it should automatically change the `post_parent` to
   nothing, so it gets moved outside. Is this correct?
 * Regards,
    Matthew 🙂
 *  Thread Starter [Radovan Smitala](https://wordpress.org/support/users/adorei/)
 * (@adorei)
 * [5 years ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-14481536)
 * Hi [@mguenter](https://wordpress.org/support/users/mguenter/)!
 * I tried to find where is the documentation page for behavior that you explain.
   I didn’t find any. Can you help me?
    Cause I think this is very variable.
 * Second part of your comment is correct. Maybe parent should not be changed when
   I am changing position within scope.
 * Regards,
    Radovan
 *  Plugin Author [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-14505928)
 * Hi [@adorei](https://wordpress.org/support/users/adorei/) !
 * > From my point of view. menu_order is always unique based on nested level. So
   > it is a combination of post_parent and menu_order.
 * In my previous answer I did misunderstand you, and here of course you are right.
 * > I tried to find where is the documentation page for behavior that you explain.
 * Unfortunately I cannot find a documentation for this, but I had a look at the`
   Quick Edit` options coming with WordPress core itself. Navigate to your post `
   Page 1.1` and change the `Order`, the order will be only within this post parent(
   scope).
 * > Second part of your comment is correct. Maybe parent should not be changed 
   > when I am changing position within scope.
 * Yeah, I know what you mean. This is because `menu_order` is simply used as the
   position for the current scope (`post_parent`). We do not currently change the`
   post_parent` if you move a post via drag & drop, we simply update the `menu_order`.
   In other terms, we need to introduce a new drag & drop experience to also move
   the posts horizontally, not only vertical. Do you know what I mean?
 *  Thread Starter [Radovan Smitala](https://wordpress.org/support/users/adorei/)
 * (@adorei)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-14524988)
 * Hi Matthias!
 * Yes, maybe I was too vague and my point was unclear about menu_order. Sorry for
   that 🙂
 * It looks like it is as you are saying with QuickEdit
    post_parent is always set,
   so menu_order is within that node scope.
 * > Yeah, I know what you mean. This is because menu_order is simply used as the
   > position for the current scope (post_parent). We do not currently change the
   > post_parent if you move a post via drag & drop, we simply update the menu_order.
   > In other terms, we need to introduce a new drag & drop experience to also move
   > the posts horizontally, not only vertical. Do you know what I mean?
 * Maybe I understand. By XHR request I see that you are sending only sequence collection
   of IDs and based on that collection and position within collection is menu_order
   updated for every post id.
 * As my first part of comment: I think menu_order should be ordered only within
   node scope and must not be able to move-out of scope. To increase UX.
 * Is a somewhere public repository for this plugin? Just to check and maybe open
   PR 🙂
 *  Plugin Author [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-14667509)
 * Hi again!
 * Thanks for your reply, and apologies for the delayed response.
 * Unfortunately we cannot provide this feature at the moment due to missing capacity.
 * > Is a somewhere public repository for this plugin? Just to check and maybe open
   > PR
 * At the moment, we cannot provide a public repository as all our plugins (including
   the PRO) are within a monorepository. But you could check out `trunk` of the 
   wp.org repository: [https://plugins.svn.wordpress.org/real-custom-post-order/](https://plugins.svn.wordpress.org/real-custom-post-order/)
 * What do you think?
 * Regards,
    Matthew 😊
 *  Plugin Author [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-14708636)
 * Due to inactivity this thread gets closed. Please feel free to reopen! 😊
 *  Thread Starter [Radovan Smitala](https://wordpress.org/support/users/adorei/)
 * (@adorei)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-15011647)
 * Hi [@mguenter](https://wordpress.org/support/users/mguenter/)
 * sadly without access to original code I am not able to “change” or create pull-
   request for such kind of feature.
 * So maybe in the future somehow 🙂
 * R.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Change position within node/level’ is closed to new replies.

 * ![](https://ps.w.org/real-custom-post-order/assets/icon-256x256.gif?rev=2292713)
 * [Real Custom Post Order: Create a custom order for your content](https://wordpress.org/plugins/real-custom-post-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/real-custom-post-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/real-custom-post-order/)
 * [Active Topics](https://wordpress.org/support/plugin/real-custom-post-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/real-custom-post-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/real-custom-post-order/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Radovan Smitala](https://wordpress.org/support/users/adorei/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/change-position-within-node-level/#post-15011647)
 * Status: resolved