How to Disable Automatic Updates feature in WordPress

WordPress has a good feature to update itself automatically. It is good practice to update WordPress sites periodically, as well as WordPress release new version. It is not advisable to disable this feature, but sometimes your site got broken due to some plugins which are not compatible with new version of WordPress. In that situation, you … More How to Disable Automatic Updates feature in WordPress

Dynamically add login/logout link to a WordPress menu

Using ‘wp_nav_menu_items’ filter we can modify wordpress menu and able to add or remove links.Following code will add dynamic login and logout link to a wordpress menu which primary location is ‘topmenu’. add_filter(‘wp_nav_menu_items’, ‘wp_login_logout’, 10, 2); function wp_login_logout($items, $args) { if($args->theme_location ==’topmenu’): if (is_user_logged_in()) { $items .= ‘<li><a href=”‘. wp_logout_url() .'”>Log Out</a></li>’; } else { … More Dynamically add login/logout link to a WordPress menu