Category Archives: Codes

How to Disable WordPress Plugin ? Easy Method

Have you trapped with a plugin ? which installed recently to your website admin side and not allowing to login.

Here are easy way to get rid of this situation,

 

Go to PHPMyAdmin using your hosting services,

Then click on the database and click on ‘Search’ icon which is available within the phpmyadmin top menu.

Search term ‘active_plugin’ by selecting all the tables.

– The results may appear with a list which having the term active_plugin
– Browse on ‘tableprefixname_options’ table which might be showing in the results
– Click on edit option and change the value as shown below,

a:1:{i:0;s:48:”blahblahblah”;}

to

a:0:{i:0;s:48:”blahblahblah”;}

 

 

 

How to Add Login Session to Your WordPress Website

Here is the simple way,

Go to your admin page and click on Editor from Appearance menu.

Check for functions.php and add/edit it with the below code,

 

//Login Session Coding

add_filter(‘wp_nav_menu_items’, ‘add_login_logout_link’, 10, 2);
function add_login_logout_link($items, $args) {
ob_start();
wp_loginout(‘index.php’);
$loginoutlink = ob_get_contents();
ob_end_clean();
$items .= ‘<li>’. $loginoutlink .'</li>’;
return $items;
}

Once this is added to functions.php, your primary and secondary both menus will display the session status.

Thanks