Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 1 reply, 2 voices, and was last updated 10 years, 7 months ago by
Steven Zahm.
-
AuthorPosts
-
01/07/2016 at 3:23 am #360236
karen-2
ParticipantHello,
I need to place the Form for users to submit their own listings on a custom page. That page will be placed behind a content-restriction wall (using Woocommerce Membership plugin to restrict access to the page). I used to be able to do this using the [connections_form] shortcode. However, I understand that use of that shortcode has been discontinued, and we are now supposed to enable to function for users to just click a button to Add New Directory. However, I don’t want that button/link to be on the same page as the Directory.Our Directory will list all of our Certified Instructors. People will come to the site and search the directory to find an Instructor near them. I do not want regular users to see a button or link to Add New Directory, because only Certified Instructors can add a listing. I will use the Link function and require users to be logged in to submit their directory, but I can’t limit access based on their WordPress User Role. Access to the directory is based on whether they are a Certified Instructor, which is controlled by the Membership plugin and is not tied to their User role at all. (Doesn’t work to link that to their User role, because our Instructors can be authors, teachers, subscribers, etc.)
I would like to have the Directory on one page that the public can access.
Then Instructors would go to the private Instructors Only section of the website, where they would find the link to either Submit a new form, or Edit their existing one. They can’t get to this page without being logged in and having permission, so I would set the Link function to allow everybody to edit their own listing. But, is there a way to get a link or button to Edit listing on this page, instead of on the Directory page? And to still use the Form embed code for here?Thanks.
01/07/2016 at 10:26 am #360271Steven Zahm
Keymaster@ karen
re: I need to place the Form for users to submit their own listings on a custom page. That page will be placed behind a content-restriction wall (using Woocommerce Membership plugin to restrict access to the page). I used to be able to do this using the [connections_form] shortcode. However, I understand that use of that shortcode has been discontinued, and we are now supposed to enable to function for users to just click a button to Add New Directory. However, I don’t want that button/link to be on the same page as the Directory.
You can continue to use the shortcode. I will not be removing it. In fact, just last week, I added new shortcode options to it at another user’s request. I will be greatly de-emphasizing the use of the shortcode mostly for beginner WordPress users because they are difficult to understand. My goal will be to make thing more and more point and click friendly.
re: is there a way to get a link or button to Edit listing on this page, instead of on the Directory page?
Install the code Snippets plugin.
Add a new code snippet with the following code:
add_shortcode( 'connections_edit_link', 'cn_edit_my_entry_shortcode' ); function cn_edit_my_entry_shortcode() { // Grab an instance of the Connections object. $instance = Connections_Directory(); // Get the current user ID. $userID = get_current_user_id(); // Check to see if the entry has been linked to a user ID. $entryID = get_user_meta( $userID, 'connections_entry_id', TRUE ); $results = $instance->retrieve->entries( array( 'id' => $entryID ) ); if ( is_user_logged_in() && ( $userID == $results[0]->user && $entryID == $results[0]->id ) && ( current_user_can( 'connections_edit_entry' ) || current_user_can( 'connections_edit_entry_moderated' ) ) ) { return cnURL::permalink( array( 'type' => 'edit', 'slug' => $results[0]->slug, 'text' => 'Edit My Entry', 'return' => TRUE ) ); } }Save and activate the snippet.
Add the
[connections_edit_link]shortcode to your members profile page.Hope this helps, let me know.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
