How to redirect logged out users to specific page?

home_url() will accept a parameter that will be used in the creation of the URL. The bare minimum solution would be: add_action( ‘wp_logout’, create_function( ”, ‘wp_redirect(home_url(“/path/to/page”));exit();’ ) ); site_url() will also accept the same parameter and may be (probably is) a better choice. I believe that using either of those will make the link dependent … Read more

LogOut button only if logged in in front end menu widget

To add a menu item to the end of a nav menu you can use the wp_nav_menu_items hook. Combine that with is_user_logged_in() and you ought to have it. function add_last_nav_item($items) { if (!is_user_logged_in()) { return $items .= ‘your login link’; } } add_filter(‘wp_nav_menu_items’,’add_last_nav_item’); As far as translation, I assume that qTranslate uses the standard translation … Read more

wp_logout_url($redirect); is not working in wordpress

You are using PHP tag inside echo statement. Try this: echo ‘<a href=”‘.wp_logout_url().'” title=”Logout”>Logout</a>’; If you want to redirect to any specific url then you can pass it as argument of wp_logout_url. Check official documentation of wp_logout_url. Note : It is recommended to return value from the shortcode function rather than directly displaying it. Try … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)