"add a franchise"
This topic contains 8 replies, has 4 voices, and was last updated by Alex Rollin 6 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: snippet
-
AuthorPosts
-
February 11, 2019 at 2:39 pm #468202
Hi,
is it possible to add “add a franchise” in the user dashboard ?
because it’s complicated to find it for users.
Thanks you in advance
February 11, 2019 at 5:18 pm #468225Hi,
I asked to the developers to check if possible.
They’ll let you know asap.
Thanks
February 11, 2019 at 6:14 pm #468242Thanks
February 12, 2019 at 8:27 am #468385Hello,
Add Franchise action is displaced under author actions(Edit, Delete) widget etc(see screenshot) which has actions for the viewing listing. User dashboard contains links for users’s listings page, favorites page, profile etc.
If you add Author Actions widget then it will display “Add Franchise” action on the listing page and under author actions.
If you still want to display “Add Franchise” under User Dashboard widget, then let me know i will provide snippet for that.
Kiran
February 12, 2019 at 10:27 am #468419Hi
thank you
I have already done this, but I find the path not easy for users. I think that instinctively we look for this action in the dashboard.
If you have the code extract to add it to the dasboard, it would be great…Thanks
February 12, 2019 at 10:56 am #468428Hello,
Add following code snippet to display “Add Franchise” link above the user dashboard links.
/** * Display add franchise link under user dashboard widget. */ function gd_snippet_190212_dashboard_links( $dashboard_links ) { global $gd_post; if ( ! ( function_exists( 'geodir_franchise_add_franchise_link' ) && ! empty( $gd_post->ID ) && is_user_logged_in() && geodir_is_page( 'detail' ) ) ) { return $dashboard_links; } $franchise_link = geodir_franchise_add_franchise_link( $gd_post->ID ); if ( ! $franchise_link ) { return $dashboard_links; } $franchise_link = '<li>' . $franchise_link . '</li>'; $dashboard_links = $franchise_link . $dashboard_links; // Display before dashboard links //$dashboard_links .= $franchise_link; // Display after dashboard links return $dashboard_links; } add_filter( 'geodir_dashboard_links', 'gd_snippet_190212_dashboard_links', 20, 2 );Kiran
February 12, 2019 at 11:20 am #468435For clarification, this snippet does almost exactly the same thing as the normal link included in the GD > Author Actions widget, it just shows the link inside the Dashboard widget.
Also, to be clear, it is the same also that it only displays on the parent or franchise listing detail page, and only when the list has “Has Franchise” set to yes.
February 12, 2019 at 11:46 am #468443yes, indeed, it doesn’t solve my problem, because I had already added this link. The problem is that users do not think to click on the mother list to find this link.
do you have a solution to display this link elsewhere?
Thanks
February 12, 2019 at 12:25 pm #468466The Add Franchise link is displayed with GD Author Actions element, anywhere where the Author Actions are displayed.
You can display author actions inside the Detail or Archive Item.
Are you using UsersWP? If you are then the author actions will show also in the “My Listings” inside each of the listings, as long as you have included Author Actions inside the archive item template.
Generally speaking it is not possible outside of those options to display the link anywhere else because there is a practical requirement to link the “Add Franchise” link and the resulting form BACK to the original parent listing where “Has Franchise” has been checked off.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket