Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Wordpress menu management has know errors?

In the menu editor, i tried to ad new pages to menu... but if i want wo select some menus they are all messed up. Most on subpages are not displayd as sub pages...
I think it happens because page list pagination. Seems like wordpress known issiue?

What should i do :(

Screenshot https://www.dropbox.com/s/4ejdutl3dq69sdg/Wordpress%20menu%20error.png?dl=0

5 Answers

Camilla Westin
Camilla Westin
17,673 Points

From what I can tell this is not an error. Wordpress will list all pages not regarding if they are parents or children. And then you are supposed to decide how you want to present them when adding them to the menu. I think this is just the way wordpress works. But as Franck says there is probably a plugin to solve this.

Franck Fremont
Franck Fremont
12,197 Points

I deleted my answer since I think that Camilla has much more understood the question than me. So her answer is also much more pertinent. ;-)

I found cure for this default issiue ... 1.Open file: ../wp-admin/includes/nav-menu.php

  1. Find and chagne variables with $per_page = ___ ; (somthing like 200 is ok)

Volia! Menu will not collapse to default incorrect pagination and sub page wrapping.

Camilla Westin
Camilla Westin
17,673 Points

Alright. I'm not sure I have understood your issue correct. However. If you make this change in /wp-admin/includes/nav-menu.php, I think it might be overwritten the next time you update Wordpress. Or am I wrong about this?

i guess this file does not change often.. but whenever you deliver site you have to remove "the nuke button" (different uptade buttons) I remove it like this..

function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}

add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
Camilla Westin
Camilla Westin
17,673 Points

OK, Uhm.. I would never remove the ability to update Wordpress tho. Whenever Wordpress releases security fixes I want my clients sites to be updated. But this is conversation that should be continued elsewhere. Good luck!

you don't get real security with updates. This is how you clear up the slack :D you get it different way... For example... 1. move wp-config.php one folder up (leave other files/folders where they are ) this is how you prevent msql injection.. they dont see where the file is... 2. in same file use unique keys. 3. dont use user name like admin.. and stuff like this....

if you use this code you will still get minor updates... less buttons clint has the better. They will not use it and later on when you have 20 sites.. all get outdated.. people will ruin your site with updates.. wordpress relases major updates in every 4 month. At least i try to keep long term in mind.. later on you will be unable to work.. you jsut fix errors.. on all sites..

Camilla Westin
Camilla Westin
17,673 Points

I don't agree. But this is pretty off topic so we should not get into it :)