• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WordPress Tips, Code Snippets, and How To Tutorials

  • Home
  • Blog
  • Tips
  • Snippets
  • Tutorials
  • Contact

Blog

How to update your WordPress user password without using a plugin

October 30, 2019 by admin Leave a Comment

On your WordPress website you may want to update your WordPress user password on there. You can do that without a plugin if you follow these steps on there. You may want to backup your WordPress website before you make updates to the functions.php file on there.

  1. From the left menu in your wordpress admin you can click on users > your profile on there
  2. From that page you go to account management on there
  3. You can then click the generate password button on there
  4. If you do not like the generated password you can edit it
  5. When you are done you can click update profile button on there

Now we recommend that you be very careful when you update the password and that you use a very strong password with a long mix of uppercase and lowercase letters numbers and symbols on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: WordPress Admin, WordPress Security, WordPress Settings

How to edit the css stylesheet of your WordPress theme without a plugin

October 30, 2019 by admin Leave a Comment

If you use WordPress for your website you may want to style the website using css and one way you can do that is by editing the css stylesheet on there. You can do that without a plugin if you follow these steps on there. You may want to backup your WordPress website before you make updates to the functions.php file on there.

  1. From the left menu in your wordpress admin you can click on appearance > theme editor
  2. The default is often the css stylesheet on there
  3. You can then edit the stylesheet by typing into that and then clicking the update button on there

Now we recommend that you be very careful when you edit the stylesheet or items in the appearance editor on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: CSS, Formatting, WordPress Admin, WordPress Theme

Update the WordPress visual editor with a new font without a plugin

October 30, 2019 by admin Leave a Comment

On your WordPress website the visual editor may be in a font that you do not like on there. You can update the font of the visual editor without a plugin if you add this code to your functions.php file. You may want to backup your WordPress website before you make updates to the functions.php file on it.

/**
 * Update the visual editor font
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function change_editor_font(){
echo "<style type='text/css'>
#editorcontainer textarea#content {
font-family: YOURFONTHERE;
font-size: 14px;
color: #111;
}
</style>";
}
add_action("admin_print_styles", "the_editor_font");

You can then replace YOURFONTHERE with the font and the font size and font color that you want to use on it. Now if that works for you it would update the font of the visual editor on your WordPress website on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: CSS, Editor, Formatting, Functions.php, WordPress Admin

Update the WordPress text html editor font without a plugin

October 30, 2019 by admin Leave a Comment

The text html editor on your WordPress website may be in a font that you do not like on there. You can update the font of the text html editor without a plugin if you add this code to your functions.php file. You may want to backup your WordPress website before you make updates to the functions.php file.

/**
 * Update the text html editor font
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function the_editor_font(){
echo "<style type='text/css'>
#editorcontainer textarea#content {
font-family: YOURFONTHERE;
font-size: 14px;
color: #111;
}
</style>";
} 
add_action("admin_print_styles", "the_editor_font");

You can then replace YOURFONTHERE with the font and the font size and font color that you want to use. Now if that works for you it would update the font of the html editor on your WordPress website on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: CSS, Editor, Formatting, Functions.php, WordPress Admin

Define the default visual or text html editor in your WordPress website for posts and pages

October 30, 2019 by admin Leave a Comment

The WordPress website often has two options for the editor which is the default visual editor and the text or html editor. You can define which editor is default without a plugin if you add this code to your functions.php file. You may want to backup your WordPress website before you make updates to the functions.php file.

Do the visual editor as the default editor

/**
 * Define visual editor as default editor
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') );

Do the text html editor as the default editor

/**
 * Define text html editor as default editor
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
add_filter( 'wp_default_editor', create_function('', 'return "html";') );

Now if that works for you it would define the default editor on your WordPress website on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Editor, Formatting, Functions.php, WordPress Admin

Remove the title from links in your WordPress navigation menu without a plugin

October 30, 2019 by admin Leave a Comment

On your WordPress website you may have a navigation menu at the top of the website that displays a title for the link in the menu if you hover the mouse over the links in the menu on there. You may want to remove those titles from the links in your menu on there. You can do this without a plugin if you add this code to your functions.php file. You may want to backup your WordPress website before you make updates to the functions.php file.

/**
 * Remove menu title
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function no_menu_title( $menu ){
return $menu = preg_replace('/ title=\"(.*?)\"/', '', $menu );
}
add_filter( 'wp_nav_menu', 'no_menu_title' );
add_filter( 'wp_page_menu', 'no_menu_title' );
add_filter( 'wp_list_categories', 'no_menu_title' );

Now if that works for you it would remove the titles from the link in your WordPress navigation menu on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Links, Menus

How to add a search bar to your WordPress website navigation menu without a plugin

October 30, 2019 by admin Leave a Comment

If you have a WordPress website you may want to add a search bar to the navigation menu. You can do this without a plugin if you add this code to your functions.php file. You may want to backup your WordPress website before you make updates to the functions.php file.

/**
 * Empty trash automatically
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function add_search_to_nav($items, $args) {
ob_start();
get_search_form();
$searchform = ob_get_contents();
ob_end_clean();
$items .= '<li>' . $searchform . '</li>';

return $items;
}
add_filter('wp_nav_menu_items','add_search_to_nav', 10, 2);

Now if that works for you it would put a search bar in your WordPress navigation menu on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Menus, Navigation, Search

How to empty the WordPress trash automatically after a number of days on your website without a plugin

October 30, 2019 by admin Leave a Comment

On your WordPress website you may delete items like posts or pages and those items may go to the trash on there. This may help keep your database smaller on the website. You may want to have the trash automatically empty without using a plugin. You can then add this code to your functions.php file. You may want to backup your WordPress website before you make updates to that on there.

/**
 * Empty trash automatically
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
define('EMPTY_TRASH_DAYS', # );

You can then replace the # with the number of days you want WordPress to wait before it automatically empties the trash on there. Now if that works for you it would automatically empty the trash after the number of days you put on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Database, Functions.php

How to limit the number of post revisions on your WordPress website without a plugin

October 30, 2019 by admin Leave a Comment

If you use WordPress on your website you may have noticed that when you edit a post WordPress often saves those revisions and if you use the screen options to display the post revisions you may see a really long list of revisions. You may want to limit the number of revisions that it has in that list without using a plugin. You can then add this code to your functions.php file. You may want to backup your WordPress website before you make updates to that on there.

/**
 * Limit post revisions
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', #);
if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', false);

You can then replace the # with the number of revisions you want per post like 3 or 4 or 5 for example. Now if that works for you it would limit the number of post revisions on the posts on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Post Revisions, WordPress Admin

How to direct new registered users to a page on your WordPress website without plugin

October 30, 2019 by admin Leave a Comment

When you have people register on your WordPress website you may want to redirect those new registered users to a page on your website. If you want to do that without a plugin you can then add this code to your functions.php file. You may want to backup your WordPress website before you make updates to it.

/**
 * Redirect registered users
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function do_registration_redirect(){
return home_url( '/done/' );
}
add_filter( 'registration_redirect', 'do_registration_redirect' );

You can then replace the /done/ with the page you want new registered users to go to. Now if that works for you it would direct new registered users to the page you list on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Links, Redirect, Users

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 3
  • Go to page 4
  • Go to page 5
  • Go to page 6
  • Go to page 7
  • Interim pages omitted …
  • Go to page 14
  • Go to Next Page »

Primary Sidebar

Hey, We Deliver... Anywhere!

Enter Email Address below to receive our snacks via email:

Join Over 1200 Readers!

Jump To A Random WordPress Tip

Copyright © 2019 • wpsnacks.com