Support » Networking WordPress » Linking to an admin menu function?

  • Resolved speedyp

    (@speedyp)


    I’ve customized the main dashboard screen with links to edit posts, new post, etc.

    I’ve also created new wp menu items for background & header image, but I’m not sure how to link to them without using the admin sidebar?

    For example, the background button link shows as http://mainsite/sample-blog1/wp-admin/themes.php?page=custom-background

    but trying to add a hyperlink like: themes.php/?page=custom-background ends up with a 404?

    Probably something really simple to fix???

Viewing 3 replies - 1 through 3 (of 3 total)
  • sorted

    Debugging a backend is very hard without access to the backend, so the more you can describe the better.

    Visit your “custom background” page and look at the URL. If you can’t copy that URL into your hyperlink and have it work, then something is badly wrong. Try copying that link and pasting it directly into the browser URL box. Then try pasting it into your script.

    Don’t use relative URLs and do use admin_url(...).

    Thanks – that’s all it was as you suggested – I’d been putting /wp-admin
    instead of just wp-admin !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Linking to an admin menu function?’ is closed to new replies.