Filter Content on Ultimate Membership plugin based on the Country Field Form

I'm using the Ultimate Membership plugin with custom form where user can select their country. This custom form is built using UM default form feature. How do i filter content based on the selected country? Maybe something like this <if UM country == singapore> Show singapore content <else if> Show generic content </end if>
Category: Web

Reading additional fields in PMPro

I am currently working with PaidMembershipsPro, so I wanted to simply add a field with a phone number using register helper and check if the phone number has already been registered on the website. To do so, I used the hook “pmpro_after_change_membership_level”, and ran into a problem that writing print_r( get_userdata($current_user->ID)) doesn’t show the phone number at all. I guess I have to use the dome special function from PMPro, but I cannot find it anywhere. So how do I …
Category: Web

Custom fields not showing up in the user info (PaidMembershipsPro)

I have added a custom field into the registration for in pmpro (https://gist.github.com/travislima/391c0db4121366a40eaa1bb5f8d18978), and now I am trying to retrieve that data using php. The problem is that not only I could not find a way of getting user info from php (except for the membership level), but also in the member profile this field is shown as empty. What can I do to get this data?
Category: Web

Any tips for a plugin to define specific pages navigation for specific types of users / members?

Is there a plugin for Wordpress to define sort of a membership program? My requirement is to have registered users, basically members, and according to their (paid) plan, they can have access to some specific areas of my website. Currently I found https://wordpress.org/plugins/wishlist/ but I was wondering if there are other plugins on the market. So I can evaluate pro and cons of more than one plugin and target my best choice. Thanks in advance
Category: Web

How does a WooCommerce site integrate with the existing real world customer members?

I have an ordinary website (no WooCommerce function), and now adding woocommerce plugin to enable it with selling functions. Now I have some existing customer members from the real-world shop, how to add these real-world members to this “new online shop with woocommerce plugin”? so that these old member can enjoy some privileges in this online shop. Do I need to buy one more "WooCommerce Subscriptions Plugin" to incorporate it?
Category: Web

Which membership plugin for a simple sign in? Personal areas for customers

Most of the membership plugins I have found seemingly operate on the logic of the website having paying subscribers. I am not looking to make a publishing/blogging website with restricted access to articles. I am not interested in a plugin that I must continually pay for. I won't be billing my customers on a monthly basis. Imagine a company website with a small login section. I am looking for something that'll allow me to restrict access to certain areas, each …
Category: Web

Membership and search criteria

I am having trouble finding the best method i which to achieve what i need from my site. I have been playing with some plugins to no avail but basically i need to achieve the below, do we think this is too niche and should be done with custom coding? The ability to create multiple different accounts in which there would be 2 different registration forms uploading pictures for their profile Adding eCommerce pricing based on criteria for one of …
Category: Web

how to handle premium features in a wordpress plugin?

I am developing a plugin in wordpress. I have a question regarding the premium features. How we can manage premium features between free and paid membership? Are those features already part of plugin but disabled and once payment is made we just enable it? But then what if an average wp plugin developer like me crack those features ? Is there some kind of encryption used? I am more interested in saas type of membership. So there has to be …
Category: Web

grant multiple roles access to specific admin menu item

I am writing a plugin that offers an admin menu item which only a specific, custom user role ("customrole" in the example) can access. I have implemented this as follows, and it works: function add_admin_menu() { add_menu_page( 'Custom-Plugin', 'Custom-Plugin', 'customrole', 'custom-plugin', 'init_custom_menu_page' ); } The problem is that the administrator does not have the rights to access this menu item anymore; I would like administrators to still be able to access it, however (and the "customrole"-users). How can I achieve …
Category: Web

Editor can create any new user except administrator

I have set up a WordPress site for a client. The client has the Editor role, however I have installed the Members plugin and given the client the capability to add new users to the WP admin. This is working just fine. The question I have is that I would like for the client to have the ability to create new user as with the roles of a Contributor, Subscriber, Editor and Author, but NOT Administrator. The new users the …
Category: Web

Public WP website with one area just for members

I want to create public WordPress website (for a sports club), but with one closed area just for the members. The public part of the site will have the usual pages: club info, photo gallery, contact page... The closed site area: will have access thru login page (as page added in the menu / navigation) a member must type the username and password in order to login after the login, each member can see only one page (page created just …
Category: Web

What permissions does a role need for the user to be assigned as the author of a post?

I have a Wordpress site with custom roles (except for administrator) and now wanted to create a role so that a user with this role can be manually assigned as the author of a post. I thus created a role which had all permissions checked in the "post" submenu, but none in the others (since this role is only there for this reason). A user that has this role assigned can now however still not be chosen as the author …
Category: Web

Adding multiple user roles dynamically

We are using this plugin Members to give users multiple roles on our site, in this case we have "Vendor" and "Instructor". After submitting a Gravity form to become a 'Vendor' I have added this code to functions.php to dynamically add a secondary user role of 'Instructor'. function add_instructor_role( $entry, $form ) { $user_id = get_current_user_id(); $user = new WP_User($user_id); $user->add_role('Instructor'); } add_action( 'gform_after_submission', 'add_instructor_role', 10, 2 ); This code does not work like we had hoped it would. So, …
Category: Web

Remove Ability for Other Users to View Administrator in User List?

(Moderator's note: Original title was "Remove Admin from User Menu") I have created a client administrator role which is essentially an Editor with ability to add/remove users. The article "Editor can create any new user except administrator" was excellent in helping keep my new client admin role from editing or creating a True admin user. However what would be ideal is to hide administrators from client admins when they are viewing users. I want them to "believe" that they are …
Category: Web

Take sign ups on one site and programmatically create user accounts on a sub domain

I have a client on a bootstrap budget looking to take payments on one site and then dynamically create a user account based on the information provided on a subdomain. Is anyone aware of any plugins that may facilitate this or a good approach to take? My initial thinking is to use Gravity Forms on the subdomain to take the payment and create the account and to have the form display within an <iframe> on the primary domain. Does anyone …
Category: Web

Compare post levels and user levels wishlist member

I'm using Wishlist Member plugin and I'm building a function which compares user_levels and post_levels, but I can't get my function to work: check_user_access($userid, $postid){ // get user_levels $user_levels = WLMAPI::GetUserLevels($userid); // get the post levels $post_levels = WLMAPI::GetPostLevels($postid); // Compare user_levels with post_level $result = array_search($user_levels, $post_levels); if ($result === false) { return false; } else { return true; } }
Category: Web

Capabilites not working

I created a custom post type: add_action( 'init', 'artwork_feature'); function artwork_feature() { register_post_type( 'artwork', array( 'labels' => array( 'name' => __( 'Artwork' ), 'singular_name' => __( 'Artwork' ) ), 'public' => true, 'exclude_from_search' => false, 'capability_type' => 'artwork', 'supports' => array('custom-fields', 'comments', 'title', 'editor', 'thumbnail'), 'capabilities' => array( 'publish_posts' => 'publish_artworks', 'edit_posts' => 'edit_artworks', 'edit_others_posts' => 'edit_others_artworks', 'delete_posts' => 'delete_artworks', 'delete_others_posts' => 'delete_others_artworks', 'read_private_posts' => 'read_private_artworks', 'edit_post' => 'edit_artwork', 'delete_post' => 'delete_artwork', 'read_post' => 'read_artwork', ), 'map_meta_cap' => true, 'taxonomies' …
Category: Web

Step by Step Instructions for Making Media/Uploads Private to Only Logged-In Users

all. I found this site via a Google search that led me to this topic: How to Protect Uploads, if User is not Logged In? It looks like that solution would work for my situation (including hakre's addition). However, I am struggling to find exactly how I would go about putting all of it together and implementing it on my WP site. So, I was wondering if anybody would be..."interested"... in putting together a step-by-step guide on how to implement …
Category: Web

Is there a way to localize role labels?

I'm using Justin Tadlock's Members plugin to create new roles and WP Role on Registration to display them on the registration form. I've got a multilang site (English and Spanish) and I've localized my custom taxonomies using qTranslate. I can't use qTranslate's quicktags in the Role Label field on the Member's plugin because it doesn't save it properly (even with $new_role_label = strip_tags( $_POST['role-label'] ); commented out on role-new.php) and I can't go into the database to make the changes …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.