I'm doing a shortcode that allows me to show only x information to certain users, the shortcode receives an attribute (which would be the user's email), compares it and if it's the same it does x thing, but it's not going ...
add_shortcode('verPago', 'sh_verPago' ); function sh_verPago( $attr, $content = null ){ extract( shortcode_atts( array( 'correo' => 'sinEmail' ), $attr ) ); if ( $correo == "[email protected]" && !is_null( $content ) && !is_feed() ) return $content; return ""; }
And that's how I put the shortcode in a text widget by the backend:
[verPago correo="[su_user field='user_email']"] Si eres [email protected] [/verPago]
Where [su_user field="user_email"] is another shortcode that offers me a plugin installed, if I directly post an email, if it works, but passing this shortcode does not go ...