WordPress.org

Ready to get started?Download WordPress

Forums

Adding Menu's in wp-admin/menu.php (4 posts)

  1. Naatan
    Member
    Posted 8 years ago #

    Hey there,

    I've been trying to modify the code in menu.php to add a menu link to the top menu bar. However I can't get it to show up.

    I know there are functions I can use to show it plugin-wise, but I am trying to hack the original code as I want to modify my wordpress slightly so that I can use it as a CMS.

    The code I am currently using is as following;

    $menu[46] = array(__('Uploads'), 'upload_organizer', 'uploads.php');

    and I added this in front of $menu[40]... (etc) as that's where I want it to appear.. (I also tried using number 39 or using number 40 and increasing the following menu's numbers)

    Like I said though, this won't work..

    can anyone tell me how this works?

    Also, how can I modify which sub-menu gets high-lighted when a menu is clicked (ie. I wan't "Write Page" to be highlighted rather than "Write Post", when "Write is clicked)

    Thanks a lot in advance :)

  2. Naatan
    Member
    Posted 8 years ago #

    Bump, anyone? :(

  3. whooami
    Member
    Posted 8 years ago #

    http://codex.wordpress.org/Adding_Administration_Menus

    thats the only way to explain it.

    if you dont want to do that, then look at how its done inside the core files.

    there really isnt a better explanation.

  4. retsoced
    Member
    Posted 8 years ago #

    That article really doesn't help much, it doesn't even seem to cover 2.0 (Icould be wrong - but it covers plugins, not hard-coding) I am trying to do the same thing, and it seems it is a permissions issue?

    I found the permissions lists here:
    wp-admin/upgrade-schema.php
    and added my item there, to no avail. I think I'm close, but no solution yet....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags