WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Link from admin area to index/home page??? (10 posts)

  1. speedyp
    Member
    Posted 1 year ago #

    Really struggling with this, yet it seems there must be an obvious solution...

    I've created my own admin dashboard for subsites, with useful links to:
    Pages
    Posts
    Add new Post
    Background
    Header Image
    etc. etc.

    I can't seem to add a link to take you from the admin dashboard to your own subsite home page?? I'm using the 2012 theme, with "homepage shows recent posts"

    So far I've tried:

    <a href="home">Site Home</a> (results in wp-admin/blog)
    <a href="/home">Site Home</a> (result mainsite.com/blog)

    I need a structure will escape the wp-admin and get you back to http://mainsite.com/subsite/index

    AAARRRGGHHHH!

  2. PHP magic. Try using get_bloginfo('url')

    That will get the URL of the site you're currently on :)

  3. speedyp
    Member
    Posted 1 year ago #

    Thanks Mika, need a wee bit more help with this though..

    how would you incorporate this as html? Like this?
    <a href="get_bloginfo('url')">Site Home</a>

    I'm using a plugin called "custom dashboard widget" but it only lets you add html, not sure about php??

  4. Alas it's <a href="<?php get_bloginfo('url'); ?>">Site Home</a>

    And if the plugin doesn't take PHP you may be out of luck using that plugin. However....

    I can't seem to add a link to take you from the admin dashboard to your own subsite home page??

    You know that on the grey toolbar, at the top of the site, where it shows the site name? You click on that and go to the home page.

  5. speedyp
    Member
    Posted 1 year ago #

    LOL - yeah, I had spotted that :)
    I'm trying to create a user-friendly version of basic functions on the dashboard. Got everything there now, except the elusive link to your home page!

    It seems fairly easy to create your own custom dashboard widget, but all the tuts I've seen only add html content. I wonder how to add the get blog info function in there???

  6. speedyp
    Member
    Posted 1 year ago #

    OK, on a different tack....

    Unless someone tells me otherwise, php is not possible within dashboard widgets.

    So... Suppose I created a new dashboard page. I could add anything I wanted to that, infact it would be a lot easier.

    Then I can arrange so that when a user logs in, they go to the new page instead of the dashboard.

    OK so far, but what happens if they login on the main site instead of their own subsite... how can I still take them to the "dashboard" page I've created on their own site?????

  7. speedyp
    Member
    Posted 1 year ago #

    Talking to myself again :O

    It appears you CAN redirect any user to their own site if they login at the main site - thanks to David Sader's magic little plugin:
    http://wordpress.org/support/topic/automatic-redirection-to-child-site-from-main?replies=15

    So all that's left to do, is to redirect them once they get there to my welcome help page instead of their dashboard & voila!

    Why do I make things so difficult for myself??

  8. Because it's fun and that's how we learn things :D

  9. speedyp
    Member
    Posted 1 year ago #

    :) The more I learn, the more questions I seem to have.

    Going to wrap this up on a very positive note. For anyone crazy enough to want to create their own alternative to the ugly? default dashboard:
    1. Create your own page with any links and info you want your users to see.

    2. Download this fantastic little plugin and put it in your mu-plugins folder (if you don't have that folder already then just create it in wp-content). Plugin on this thread:http://wordpress.org/support/topic/automatic-redirection-to-child-site-from-main?replies=15

    3. The plugin will do 2 cool things for you - if a user logs in on the main site, it will take them straight to their own site. The default landing page will be their admin page, but if you've created your own dashboard page you can modify the plugin and replace the "wp-admin" bit with your new page eg. "welcome".

    And that's all there is to it!

  10. speedyp
    Member
    Posted 1 year ago #

    Resolved :-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.