Replies: 0
Dear Sarah,
Thanks for this great plugin.
I would like to use Dynamic User Directory multiple times on a website:
– Showing the list of active members (big avatar, several information)
– Showing the list of former members (smaller avatar, name, and duration of stay)
– Showing in the author.php page one specific member (complete profile information)
I managed to create a child plugin for doing that. It relies on shortcode options used for overriding the common configuration (defined via the admin page). So it is possible for example to use the following shortcodes:
[DynamicUserDirectory]
or
[DynamicUserDirectory email="0" website="0" border_length="25%" hide_roles="Administrator"]
I would be glad to share this code with you if you are interested in merging this solution with the existing plugin. Indeed, for this extension to work, I had to replace the ‘DynamicUserDirectory’ shortcode to use the extension as following:
function DynamicUserDirectoryExtendLoad() {
if(!is_admin()) {
remove_shortcode( 'DynamicUserDirectory');
add_shortcode( 'DynamicUserDirectory', 'DynamicUserDirectoryExtend' );
}
}
add_action( 'plugins_loaded', 'DynamicUserDirectoryExtendLoad', 12 );
It is not as flexible as I hoped (DynamicUserDirectoryExtend()
is a duplication of DynamicUserDirectory()
with the support for overriding via shortcode options), meaning that every new version that affects the DynamicUserDirectory()
function also affects DynamicUserDirectoryExtend()
.
I am currently using the last version (1.2.0 at the time of writing) of Dynamic User Directory.
Cheers,
Nicolas