This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//below code should be added into your wp-config.php file | |
//Example 1: autosave every 30 seconds | |
define('AUTOSAVE_INTERVAL', 60); //autosave every 60 seconds | |
//Example 2: autosave every 5 minutes | |
define('AUTOSAVE_INTERVAL', 300); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//below code snippet is to be added to WordPress theme functions.php file | |
//enable SVG upload | |
function tt_enable_svg_upload( $mimes ) { | |
//Only admin can upload SVG file | |
if ( !current_user_can( 'administrator' ) ) { | |
return $mimes; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//add below code into wp-config.php | |
define('EMPTY_TRASH_DAYS', 1 ); //Integer is the amount of days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//add this code snippet to the wp-config.php file to increase your memory limit to 100MB | |
define('WP_MEMORY_LIMIT', '100M'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To access the functions.php file through your WordPress Admin interface, follow these steps: | |
Step 1: Log in to the WordPress Admin interface. | |
Step 2: In the left sidebar, hover over "Appearances", then click "Theme Editor" (recommended to use child theme). | |
Step 3: In the right sidebar, click functions.php and you can the code snippet at the bottom of the file. | |
Step 4: Click "Save" to apply the changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//below code snippet is to be added to WordPress theme functions.php file | |
//option 1: remove the WordPress admin bar for all users | |
add_filter('show_admin_bar', '__return_false'); | |
//option 2: hide the WordPress admin for everyone except users with administrator privileges | |
add_action('after_setup_theme', 'remove_admin_bar'); | |
function remove_admin_bar() { |
NewerOlder