dil_bert Posted October 30, 2017 Share Posted October 30, 2017 Hello dear developer, hello dear user, i run a plugin that works as a job-database – it is a plugin that is called participant-databaae; this plugin shows up; employer with their adress: applicants with their data ? but: there is a set of sensible data like– e-mail-adress– adress: town, street, housenumer Those sensible data should be hidden? for the non registered users of Participant database. see https://wordpress.org/plugins/participants-database/ Well – that Participants Database doesnt have a special "login"-feature: In other words: There is no way to know if someone is a registered user or not – unless they are logged in to a user account on the site. If we want to hide fields from users that are not logged in, there are two ways to go: we can use either a custom template or a PHP shortcode snippet – something like this: <?php $fields = 'first_name,last_name'; if ( is_user_logged_in() ) { $fields = 'first_name,last_name,email,address,city'; } echo do_shortcode( '[pdb_single fields="' . $fields . '" ]' ); ?> possible solutions,; we can make use use of a ?use PHP in the content? plugin or do this in a custom WP template. question, how would you solve this task!? love to hear from you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.