Title: ncwebdev's Replies | WordPress.org

---

# ncwebdev

  [  ](https://wordpress.org/support/users/ncwebdev/)

 *   [Profile](https://wordpress.org/support/users/ncwebdev/)
 *   [Topics Started](https://wordpress.org/support/users/ncwebdev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ncwebdev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ncwebdev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ncwebdev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ncwebdev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ncwebdev/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Subpage Menu] Menu-Link doesn't work properly when moving a page](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/)
 *  Thread Starter [ncwebdev](https://wordpress.org/support/users/ncwebdev/)
 * (@ncwebdev)
 * [10 years ago](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/#post-7196418)
 * Hi jojoee,
 * it’s me again. 🙂
    Have checked the modified plugin and found one minor thing
   which maybe could be improved: When the moved page have children itself, they
   are not moved with their parents but were moved to the top level.
 * Before:
 *     ```
       parent 1
       > child 1-1
         > child 1-1-1
       parent 2
       ```
   
 * When I move `"child 1-1"` to `"parent 2"` it will become
 *     ```
       parent 1
       parent 2
       > child 1-1
       child 1-1-1
       ```
   
 * Maybe you can improve your plugin that it can also handle that sub-pages?
 * Kind Regards… 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Subpage Menu] Menu-Link doesn't work properly when moving a page](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/)
 *  Thread Starter [ncwebdev](https://wordpress.org/support/users/ncwebdev/)
 * (@ncwebdev)
 * [10 years ago](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/#post-7196417)
 * Yeah!!!!!!!
 * I found the bug in your plug-in and now I know, why you can’t replicate my problem.
   🙂
    Your plug-in is working fine when you uses the default table-prefix (“wp_”),
   but as I have multiple WP-installations in my database I uses a custom table-
   prefix for each installation. In your function `remove_page_from_menu` you named
   the table `wp_term_relationships` straight.
 * I have updated your function like this and now it seems like it works.
 *     ```
       function remove_page_from_menu( $object_id ) {
       	global $wpdb, $table_prefix;
       	$query = sprintf( 'DELETE FROM '.$table_prefix.'term_relationships WHERE object_id = %d', $object_id ); 
   
       	$wpdb->get_results( $query, OBJECT );
       }
       ```
   
 * I will make some more tests and report later … 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Subpage Menu] Menu-Link doesn't work properly when moving a page](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/)
 *  Thread Starter [ncwebdev](https://wordpress.org/support/users/ncwebdev/)
 * (@ncwebdev)
 * [10 years ago](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/#post-7196415)
 * Hi jojoee
 * Thx for your support. I have put a dump on my dropbox for you:
 * [https://www.dropbox.com/](https://www.dropbox.com/s/tpfrn23tikxiu8h/wordpress-demo.zip?dl=0)(
   Please drop me a note when you have downloaded it.)
 * Kind Regards…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Subpage Menu] Menu-Link doesn't work properly when moving a page](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/)
 *  Thread Starter [ncwebdev](https://wordpress.org/support/users/ncwebdev/)
 * (@ncwebdev)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/#post-7196389)
 * Hi jojoee,
 * sorry for the late reply but I have been on easter vacation. 🙂
 * I tried it exactly as you mentioned it above but still the same problem. When
   I moved the Baby-dog-1 from dog to cat , I become a double entry, one unter dog
   and one under cat.
 * That is more than curios … :-/
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Subpage Menu] Menu-Link doesn't work properly when moving a page](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/)
 *  Thread Starter [ncwebdev](https://wordpress.org/support/users/ncwebdev/)
 * (@ncwebdev)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/#post-7196284)
 * Hi!
 * just tested it with a clean install (4.4.2) and a standard theme (Twenty Sixteen),
   still the same problem as descripted above.
 * Cheers.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Subpage Menu] Menu-Link doesn't work properly when moving a page](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/)
 *  Thread Starter [ncwebdev](https://wordpress.org/support/users/ncwebdev/)
 * (@ncwebdev)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/#post-7196222)
 * Hi jojoee,
 * I’m running the latest WP-Version (4.4.2) with the BeTheme theme. I don’t think
   that their is a conflict with an other plugin, because I have deactivated the
   most of them, but I will test it on a clean install later, too.
 * Kind Regards…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Subpage Menu] Menu-Link doesn't work properly when moving a page](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/)
 *  Thread Starter [ncwebdev](https://wordpress.org/support/users/ncwebdev/)
 * (@ncwebdev)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/menu-link-doesnt-work-properly-when-moving-a-page/#post-7196167)
 * I created a new (sub)page => everything works fine.
 * Menu-Structure:
 *     ```
       Parent 1
       - Child 1-1
       - Child 1-2
       - Child 1-3 (new)
       Parent 2
       - Child 2-1
       - Child 2-2
       ```
   
 * Then I move the subpage to an other parent page by changing the page attribte‘
   parent’ like you provide on your [screenshot 2], the page is sucessfully moved
   to its new parent and is even shown correctly in the new position in the menu,
   BUT it remains ADDITIONAL on the old position in the menu.
 * Menu-Structure after moving:
 *     ```
       Parent 1
       - Child 1-1
       - Child 1-2
       - Child 1-3 (old position <= wrong!)
       Parent 2
       - Child 2-1
       - Child 2-2
       - Child 1-3 (moved <= correct!)
       ```
   
 * I hope you can reproduce my steps now more clearly. 🙂

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