Direct link to dashboard?

This topic contains 5 replies, has 3 voices, and was last updated by  Paolo 8 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #186549

    Scott Harris
    Lifetime Member
    Post count: 74

    Currently, when an existing user logs in, he is taken directly to the add “add new place” frontend.

    That doesn’t make sense to me because I’d think that most people who already have a login would want to be redirected to their listings pages so that they could make edits.

    Can the login be redirected to the dashboard page similar to what happens when you click on the “my listings” option in the login widget?

    #186598

    Scott Harris
    Lifetime Member
    Post count: 74

    I’m half way to figuring this out.

    I found that I can create a login link with a redirect to send users to the invoices page after logging in. Here’s what I have.

    http://www.site.com/wp-login.php?action=login&redirect_to=http://www.site.com/gd-invoices

    Can you help me construct a url with variables such that I can send people to the dashboard page instead of the invoices page?

    I need to figure out how to replace author and authorname in that redirect url so that it works for whatever user is logged in.

    http://www.site.com/author/authorname/?geodir_dashbord=true&stype=gd_place

    Thanks for your help.

    #186629

    Guust
    Moderator
    Post count: 29970

    Can you send us the URL of your site and WP admin details.
    A default installation of GD does not use wp-login.php to login, but /gd-login
    The only way to create the links with username is to use the GD Login widget (unless you use buddypress)

    #186804

    Scott Harris
    Lifetime Member
    Post count: 74

    Thanks Guust –

    If it’s not possible to create a url that sends people directly to their list of GD listings (without Buddypress), what about doing it this way?

    Create a page called “Current Listings” and use the shortcode [gd_listings post_author=”current”].

    I tried that, but it’s not filtering as I expected. I thought that the post_author=”current” part would limit the list to the logged in user’s posts. Is that the intention of this shortcode parameter?

    #186814

    Scott Harris
    Lifetime Member
    Post count: 74

    I installed Peter’s Login Redirect and set up a login redirect to the user dashboard based on user role of subscriber. The url includes the variable for the logged-in user. For others who are trying to accomplish the variable-based redirect to the current listings page, it works great with GD!

    I am still interested in setting up a page that uses the [gd_listings post_author=”current”] shortcode so that I can add an easy way for people to navigate back to their listings. I’m not a fan of the GD login widget because I think it’s not very intuitive.

    #187142

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    author=”current” doesn’t mean “currently logged in user”. Instead it uses the author ID of the post or page where it is added to show the author’s listings.

    The only way to do what you want would be to use the shortcode in a custom template with the do_shortcode() function and get the current user ID via php.

    Let su know if this is enough info to point you in the right direction.

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount