Author page Template Issues
This topic contains 11 replies, has 3 voices, and was last updated by Guust 7 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: author page
-
AuthorPosts
-
February 24, 2017 at 1:57 am #363515
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
February 24, 2017 at 7:17 pm #363711Hi,
please explain exactly what you are trying to achieve because it isn’t clear.
Thanks
March 2, 2017 at 5:45 am #364790Thanks 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.
March 2, 2017 at 7:24 am #364799Would 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
March 8, 2017 at 4:10 am #366056Thanks 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.
March 8, 2017 at 5:07 am #366057I’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?
March 8, 2017 at 5:42 pm #366175No it is not.
The shortcodes are not meant to be used for that and will only ever list published posts.
Thanks
March 9, 2017 at 6:07 am #366279OK, 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');
March 9, 2017 at 6:40 pm #366422Hi,
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
March 9, 2017 at 6:42 pm #366423An 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
March 13, 2017 at 5:35 am #366906Hi 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.
March 13, 2017 at 9:47 am #366935Rather 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
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket