Logged in only custom page

You can redirect non logged in users to login page using following code if they access custom.php page link. Create custom_login.php as custom template and assign it a page, in the code below i have assigned it to a page “login page” having slug “login-page” function redirect_to_login(){ if( ! is_user_logged_in() && is_page_template(‘custom.php’) ){ wp_redirect( home_url() … Read more

custom query to get posts

Clarification of your question: You want to show Posts of a certain category named “ABC” AND also you want to filter the posts with the tag named “XYZ”. Answer: If this is the scenario, have you tried: WP_Query()? <?php // The Query $args = array(‘post_type’ => ‘post’, ‘category_name’ => ‘ABC’, ‘tag’ => ‘XYZ’, ‘meta_key’ => … Read more