Thank you for sharing these details.
I noticed that on your website users have multiple user role assigned to them, whereas the shortcode "wpv-current-user" can only return a single user role.
For this reason, you'll need to register a custom shortcode, that can check for multiple user roles assigned to the currently logged-in user and return 'yes' if the target user role is found and 'no' if not:
add_shortcode( 'custom_check_user_role', 'custom_check_user_role_func');
function custom_check_user_role_func($atts)
{
$a = shortcode_atts( array(
'role' => ''
), $atts );
$found = 'no';
$user = wp_get_current_user();
if ( $user->ID != 0 ) {
if ( in_array( $a['role'], $user->roles ) ) {
$found = 'yes';
}
}
return $found;
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
Next, please add "custom_check_user_role" in the "Third-party shortcode arguments" section, at WP Admin -> Toolset -> Settings -> Front-end Content.
To use the shortcode, you just have to pass on the target user role to look for in the shortcode attribute "role", for example:
[custom_check_user_role role='pot_publicar_ofertes_de_feina']
And the same shortcode can be used in the conditional statement like this:
[wpv-conditional if="( '[custom_check_user_role role='pot_publicar_ofertes_de_feina']' eq 'yes' )"]
// show something if the current user has the 'pot_publicar_ofertes_de_feina' role
[/wpv-conditional]
And the combined statements for the 'pot_publicar_ofertes_de_feina' or the 'administrator' roles would look like this
[wpv-conditional if="( '[custom_check_user_role role='pot_publicar_ofertes_de_feina']' eq 'yes' ) OR ( '[custom_check_user_role role='administrator']' eq 'yes' )"]
// show something if the current user has either the 'pot_publicar_ofertes_de_feina' or the 'administrator' role
[/wpv-conditional]
I hope this helps and please let me know if you need any further assistance with this.