Different home page for logged off users

Can you use this to redirect the logged out users? <?php if ( !is_user_logged_in() { ?> <?php wp_redirect( ‘https://yourdomain.com.au/logoutpage’, 302 ); exit; ?> <?php } ?> or this solution? setting a specific home page for logged in users

Pulling a variable into the wp_nav_menu function

I think your scope is not the same. You are defining the $menu_name in one scope and calling it in another scope. So you can do it with global variable like below- $GLOBALS[ ‘menu_name’ ] = ‘Section 1 Menu’; And call it like- <div id=”nav”> <div class=”close-menu”></div> <?php wp_nav_menu( array( ‘menu’ => $GLOBALS[ ‘menu_name’ ], … Read more

AJAX Filter WHILE Loop not working WordPress

I think you should organize your code to return things from Ajax call. If this should work for any user you need to use also wp_ajax_nopriv_… However, I would use dionoh_filter_reports action name. add_action( ‘wp_ajax_dionoh_filter_reports’, ‘filter_reports’ ); add_action( ‘wp_ajax_nopriv_dionoh_filter_reports’, ‘filter_reports’ ); I suggest you check this and learn more.