Really odd. Nested not working with latest updates
-
Previous projects everything worked great. I recently went back to my code to use in new project. Unfortunately the nested aspect is not working. I’ve tried it with both my written shortcodes as well as paid plugin developer shortcodes. As “single” (not nested) all work fine. Below is my code for the is user logged in or not shortcode I’ve written. Thoughts?
`/* CONDITION – IS_USER_LOGGED_IN
*
* Check if user IS signed in
*/
function j66_check_user_signed_in ($params, $content = null) {
//check tha the user is logged in
if ( is_user_logged_in() ) {
//user is logged in so show the content
return $content;
}else {
//user is not logged in so hide the content
return;
}
}//add a shortcode which calls the above function
add_shortcode(‘logged-in-yes’, ‘j66_check_user_signed_in’ );// Check if user is NOT signed in
function j66_check_user_signed_out ($params, $content = null) {
//check if the user is logged out
if ( is_user_logged_in() ) {
//user is not logged out so hide the content
return;
}else {
//user is logged out so show the content
return $content;
}
}//add a shortcode which calls the above function
add_shortcode(‘logged-in-no’, ‘j66_check_user_signed_out’ );// [logged-in-yes][a-shortcode-to-nest][/logged-in-yes]
//
// [logged-in-no][a-shortcode-to-nest][logged-in-no]
- The topic ‘Really odd. Nested not working with latest updates’ is closed to new replies.