Author page Template Issues

This topic contains 11 replies, has 3 voices, and was last updated by  Guust 7 years, 1 month ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #363515

    oldmankit
    Buyer
    Post count: 116

    I’m struggling to add the content main section onto a WordPress page template.

    I tried copying and pasting from geodirectory-templates/geodir-author.php but have had no success.

    If I copy just this:

    do_action('geodir_author_content');

    then the page gets stuck in an infinite loop, displaying “No listings found which match your selection.” each time. Please note that when I visit the author dashboard at host/author/id/?geodir_dashbord=true&stype=gd_place then the listings are displaying correctly. I am only getting errors when trying to add that content onto a different WordPress page template.

    If I copy and paste the entire contents of geodir-author.php into a blank template file, it renders a largely useless page. Here are the contents: http://pastebin.com/q6VC3fei

    #363711

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    please explain exactly what you are trying to achieve because it isn’t clear.

    Thanks

    #364790

    oldmankit
    Buyer
    Post count: 116

    Thanks for replying, Paolo.

    On the author dashboard listing owners can see their own listings. From here they can renew and edit their listings. I’m attaching a screenshot of this. The url of the author dashboard on my site is https://reikiconnect.org/author/rcoadmin/?geodir_dashbord=true&stype=gd_place

    I would like to be able to use this in WordPress page templates.

    #364799

    Guust
    Moderator
    Post count: 29970

    Would it not be simpler to add content to the widgets on the author page, after selecting the widget areas at GD > design > author tab?

    Or use the GD Listings shortcode: https://wpgeodirectory.com/docs/core-shortcodes/#listings

    Thanks

    #366056

    oldmankit
    Buyer
    Post count: 116

    Thanks for your suggestions, Guust.

    To clarify, my author page is https://reikiconnect.org/author/myusername/?geodir_dashbord=true&stype=gd_place, and it already displays the currently logged-in author’s listing. However I want the author’s listing to appear on another page, reikiconnect.org/account.

    Would it not be simpler to add content to the widgets on the author page, after selecting the widget areas at GD > design > author tab?

    This content already appears on the author page. The issue is that I want it to appear on another page.

    Or use the GD Listings shortcode: https://wpgeodirectory.com/docs/core-shortcodes/#listings

    That looks like what I am trying to do. However I cannot limit the listings to the currently logged-in author. According to the shortcode help page:

    post_author=”current” will filter the listings by author id of current viewing post

    When I add [gd_listings post_author=”current”] to the account page, I get all listings by all authors. I want it to filter the listings by currently logged-in user, but there doesn’t seem to be a parameter for that.

    #366057

    oldmankit
    Buyer
    Post count: 116

    I’m nearly there. In a template page I can use this.

    echo do_shortcode( '[gd_listings post_author="' . get_current_user_id() . '"]' );

    This returns the currently logged-in author’s published listings. However it does not list draft (expired) listings. So I still am unable to do what I wished, which is to use content from the virtual author page in a WordPress template, and I am back to my original question.

    Is there a way to get the currently logged-in author’s listings (published or draft) to appear on another WordPress page—not the Geodirectory virtual author page/dashboard?

    #366175

    Paolo
    Site Admin
    Post count: 31206

    No it is not.

    The shortcodes are not meant to be used for that and will only ever list published posts.

    Thanks

    #366279

    oldmankit
    Buyer
    Post count: 116

    OK, thank you for clarifying that. So now I’m back to square one: trying to use author dashboard content in a WordPress page template.

    As I described in the OP, the following didn’t work:

    do_action('geodir_author_content');
    #366422

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    that’s because it can only work if used in the author page or it won’t know what to output.

    This is considered a customization and you’ll need to hire a developer if you wish to develop a different “user dashboard” page.

    Thanks

    #366423

    Paolo
    Site Admin
    Post count: 31206

    An alternative, use UsersWP (but it’s still in beta and shouldn’t be used on a live website):

    https://wpgeodirectory.com/support/topic/userswp-beta-gd-integration-uwp-recaptcha/

    Make sure to read all replies of that thread to find latest working versions. You’ll need the latest GD integration too that can be found here: https://wpgeodirectory.com/support/topic/userswp-beta-gd-integration-uwp-recaptcha/page/4/#post-366323

    Thanks

    #366906

    oldmankit
    Buyer
    Post count: 116

    Hi Paolo,

    Thanks for that clarification.

    The reason I actually started to investigate this was because on the Front end Author page documentation, it says “This template can be easily overwritten and customized by copying it inside your theme files.”

    So copied it into my theme file, and it didn’t work. If it’s not actually possible to copy and paste this into theme files, maybe that sentence could be removed? It’s quite misleading.

    I wasn’t able to read the page you linked to because even though I have recently purchased a large amount of addons, these are lifetime addons and so I don’t have an active membership. I get a message saying “You must purchases a membership to access that forum. Buy here”.

    Thank you very much again.

    #366935

    Guust
    Moderator
    Post count: 29970

    Rather than “copying it inside your theme files” that probably be better worded as “copying it inside your child themes folder”, as per this article
    https://wpgeodirectory.com/docs/customizing-geodirectory-templates/

    Thanks

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

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

Open Support Ticket