sslv
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF®)] Add new post in CPT categoryHi all, this is how I solved the issue in case anyone is seeking solution:
add_action('frontend_admin/save_post', 'my_frontend_save_post', 10, 2); function my_frontend_save_post($form, $post_id) { $post = get_post( $post_id ); //Get Post Information if ( $post ) { $post_type = $post->post_type; //Get Post Type $selected_category_ids = array(); //Declasre Category ID $taxonomy_key = ''; //Declare Taxonomy Key if($post_type == "masterclass"){ //Get Masterclass Categories $selected_category_ids = get_field("field_65bca5d0bb5d9", $post_id); $taxonomy_key = 'masterclass-category'; } elseif($post_type == "job-offer"){ $selected_category_ids = get_field("field_6329e12f709f0", $post_id); $taxonomy_key = 'job-offer-category'; } // Retrieve category names based on category IDs if (!empty($selected_category_ids)) { wp_set_post_terms($post_id, $selected_category_ids, $taxonomy_key, false); } send_email( get_the_author_meta('user_email', get_post_field ('post_author', $post_id)), //Author Email get_the_title($post_id), //Post Title get_permalink($post_id), //Post URL $post_type //Post Type (Masterclass or Job Offer) ); exit; } }For the above code I’m using “frontend_admin/save_post” action hook. This allows me to capture the event once the form has been submitted! After getting some post information I added logic to check according to the user selection in which category the post would go. In my case “masterclass” or “job-offer”!
After that I use the “wp_set_post_terms” to force the post to a category and lastly send an email to the author. I have some additional logic while constructing the email but there are many example online so I skipped adding that part!
Hope it helps you! 🙂Hi Stiofan,
I thought to let you know that I found a way to display list of users in the GD Form. I created a shortcode and added that shortcode in the multiselect option values. Here is the code I used to create the shortcode:
add_shortcode('user_multiselect_options', 'generate_user_multiselect_options'); function generate_user_multiselect_options() { $users_by_role = get_users(array( 'role__in' => array('user_role_1', 'user_role_2'), )); $options = ''; foreach ($users_by_role as $user) { $options .= '<option value="' . esc_attr($user->ID) . '">' . esc_html($user->display_name) . '</option>'; } return $options; }- This reply was modified 2 years, 3 months ago by sslv.
Answer 1: It doesn’t apply on admin users. It will still work on Custom Roles as well.
Answer 2: Yes, The limit will be applied when the user has reached the specified number, even if the posts are transferred and not created by that user
Hi Stiofan, thanks for the quick reply.
Is it possible that the order of the core scripts are vital to the rendering of the map?
Thanks
Hi,
After some maintenance and clearing some code the issue was resolved and I was able to use /profile/username instead of /view-profile/username as a slug.
Thanks for the help
Hi Alex. Thanks for your reply.
The settings looks to be okay see below screenshot:When I go through Profile Dashboard > View Profile is also not working:
However when I go through Edit Profile > View Profile is working fine.
Also when I click directly on View Profile (or manually edit the URL) then it shows a blank page. I’m proceeding with opening a ticket as requested!
- This reply was modified 2 years, 4 months ago by sslv.
Forum: Plugins
In reply to: [Frontend Admin by DynamiApps] How to add design in Single Post viewany update?
Forum: Plugins
In reply to: [Frontend Admin by DynamiApps] How to add design in Single Post viewHi any update?
I still have the issue. I’m trying to solve with CPT UI but it requires Elementor Pro. 🙁
Let me know if there is a way around to enable users create CPTs on front end for free.
Hi Stiofan,
Places: https://thebarbersunited.com/add-listing/?listing_type=gd_place
Events: https://thebarbersunited.com/add-listing/?listing_type=gd_eventThanks, Loizos
I should note that after activation of SSL certificate it still not working.
- This reply was modified 3 years, 9 months ago by sslv.
Forum: Fixing WordPress
In reply to: How to create multi-page forms?Hi Stefan,
thanks for the update. I managed to do it for free using JavaScript. But maybe I will use it in the future.
Do you know if this plugin is one-time-charge or annual-payment?
Forum: Plugins
In reply to: [Multi Step Form] Can I use this plugin for forms created by another plugin?Okay, thanks for your time!
Forum: Plugins
In reply to: [Multi Step Form] Can I use this plugin for forms created by another plugin?Hi,
Thanks for your reply.
That’s not possible with my current GeoDirectory form which uses advanced input fields such as maps and calendars. Is there another work-around?
Thanks
- This reply was modified 4 years, 3 months ago by sslv.
Forum: Fixing WordPress
In reply to: How to create multi-page forms?So I guess the only solution is to handle it with front-end?