BLog
Want to Learn About Coding?
WordPress – Remove user role and restore default user roles
remove_role( 'subscriber' ); if ( !function_exists( 'populate_roles' ) ) { require_once( ABSPATH . 'wp-admin/includes/schema.php' ); } populate_roles();
Move WordPress media uploads to a subdomain
How to move media to a subdomain Create the subdomain on your host files.sitename.com for exampleDownload ALL the old media files from your WordPress /wp-content/uploads folder via FTPUpload ALL the media files to your new subdomainChange your...
Add image to Woocommerce shipping method
/////////////////////////////////////////// //Add image to the shipping method checkout ////////////////////////////////////////// function add_fexdex_logo(){ ?> <script> var fedexEdit = jQuery('label[for=shipping_method_0_table_rate30169]');...
Change Serbian рсд to RSD
Just put this code to the functions.php file // Change the RSD currency symbol /** * Custom currency and currency symbol */ add_filter( 'woocommerce_currencies', 'add_my_currency' ); function add_my_currency( $currencies ) { $currencies['RSD'] = __( 'Currency name',...
Change memory limit in .htaccess file
Add this code to the end of the file php_value memory_limit 256M
Copy WordPress to the subfolder of domain
Just copy copy WordPres like you are transferring wp. Edit the .htaccess file like this # BEGIN WordPress # The directives (lines) between "BEGIN WordPress" and "END WordPress" are # dynamically generated, and should only be modified via WordPress filters. # Any...
Show user ID in the WordPress dashboard
Put this code to the functions.php /* * Adding the column */ function rd_user_id_column( $columns ) { $columns['user_id'] = 'ID'; return $columns; } add_filter('manage_users_columns', 'rd_user_id_column'); /* * Column content */ function...
Style menu on Woocommerce my account page
/** * My Account NAVIGATION */ /* Change WC Acct Page Column Widths */ /* Style WC Account Endpoint Links */ li.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--downloads { display: none; } nav.woocommerce-MyAccount-navigation ul,...
Update Packages that will not upgrade Linux
sudo apt-get update sudo apt-get dist-upgrade
Remove software in Linux Mint using the terminal.
Standard way So, the most common and standard way is with this command: sudo apt-get remove package_name Completely remove (advanced) However, if you want to completely remove the program you can use the command purge instead of remove. sudo apt-get purge package_name...
Force ssl via .hatccess file
To force https:// over http:// add this code on .htaccess file RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Or this code <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} !^443$...
Add css to WordPress Dashboard
add_action('admin_head', 'my_custom_notification'); function my_custom_notification() { echo '<style> /* Your CSS here */ </style>'; }