BLog
Want to Learn About Coding?
Scan linux filesystem for errors
sudo fsck -y /dev/sda3
Linux Users share Local Directory
If you need that users on linux machine share directories you can accomplish that by creating a directory and assign to it privileges First make shared directory sudo mkdir /home/Shared\ Directory This will create a Shared Directory directory with root as owner and...
Add user ID and Role to the body class in Dashboard
If you need to customize WordPress dashboard by editing it for specific use ID or based on the user role, you can easily add body class to the dashboard with this code, which you can put it in the function.php or create this plugin <?php /* Plugin Name: Add User...
Connect Google Drive on Linux
To connect Google Drive with Linux OS use this link
Hide dropdown menu items in the dashboard using JavaScript
Hiding drop-down menu items in the Safari and IE is not possible using just CSS, the items must be removed by javaScript. Question was asked on StackOverflow. In this example body tag has class user-id var grujicFormID; /*Milan Grujic user-id-3*/ grujicFormID =...
Edit database with just FTP
If you just have a FTP and want to edit, backup or import database it is pretty hard to do that with just FTP. But if you download phpMyAdmin and upload it to the root folder of the site you have fully functional phpMyadmin on your site, just enter credentials which...
Have file manager with just FTP
Tiny File Manager Web Based File Manager In PHP, Manage Your Files Efficiently And Easily With Tiny File Manager It is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, editing...
How to Set the Default Admin Color Scheme for New Users in WordPress
In order to set a default WordPress admin color scheme for new users, all you need to do is add the following code in your theme’s functions.php file or in a site-specific plugin: function set_default_admin_color($user_id) { $args = array( 'ID' =>...
Customize dashboard plugin Adminimize
If you manage a multi-author WordPress blog or WordPress sites for clients, then you may have wondered if it was possible to clean up the WordPress admin area for your users? There are lots of things in the WordPress admin area that your users don’t need to see or...
Remove dashboard menu items for a specific user-id
If you want to remove dashboard menu items for a specific user-id add this code n the functions.php function hide_menu(){ global $current_user; $user_id = get_current_user_id(); // echo "user:".$user_id; // Use this to find your user id quickly if( $user_id == '3'){...
Add custom style to the dashboard
If you wish to add custom style to the dashboard add this code to the functions.php function my_custom_style() { echo '<style> #menu-posts-elementor_library, .wrap > form:nth-child(3) > select:nth-child(2) > option:nth-child(2), option[value="818"],...
Remove the admin bar in the dashboard for non-admins
If you need to hide dashboard admin bar for the non admin user you can use this code. It don't hide it on the frontend. add_action('admin_head', 'hide_menu', 999); add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if...