[resolved] Linking to an admin menu function? (4 posts)

  1. speedyp
    Posted 3 years ago #

    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???

  2. speedyp
    Posted 3 years ago #


  3. s_ha_dum
    Posted 3 years ago #

    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(...).

  4. speedyp
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.