Recently I was searching for an easy way for developers to add custom fonts to the Beaver Builder child theme customizer. Failing to find that, I have come up with a solution that does not modify the core Beaver Builder theme files and only requires a minimal amount code. [Read more…]
Custom WordPress Dashboard Widgets with Configurable Content
After working with WordPress dashboard widgets in a recent project I wanted to present a complete example with arguments and usage of the control callback for saving widget options. Using the code in the Gist below you will be able to configure custom content for this widget with the native WYSIWYG editor. When you hover over the widget’s title bar the “Configure” link will be revealed – you must be an Administrator to configure the widget. [Read more…]
Automatically Embedding Video Using Only the URL With the Help of oEmbed
One of my favorite functions of the WordPress editor is now the automatic embedding of video and other rich media by simply putting the URL on it’s own line. Really, it’s amazing!
Here is my rip of the WordPress code (found in the WP_Embed
and WP_oEmbed
classes) and assembled into a class named AutoEmbed
. [Read more…]
How to Reset your Lost or Forgotten WordPress Admin Login Password with wp_set_password
Let me guess…you’ve lost your WordPress admin password, you have no other admins to recover it, and you don’t have access to the admin email account either? Well I hope that you haven’t gotten yourself stuck in that sorry situation, but in case you have go ahead and do this:
Open your site through FTP or cPanel File Manager and add this line just inside the closing ?>
of your site’s wp-login.php
file (found in the root of your installation):
wp_set_password('foobar',1);
Now, open up a browser go to your WordPress site’s login page (/wp-login.php
or /wp-admin
) and login using your new password (foobar
in this case).
At this point you need to remove the wp_set_password
line from wp-login.php
and then you’re done. You can now change your password from within the WordPress admin.
The first parameter is the new password you would like to set, and the second parameter is the WordPress user ID. If you need to lookup your user ID connect to your WordPress database using phpMyAdmin or another SQL client and look in the wp_users
table.
I’m not sure why the Internet is full of pages suggesting running SQL commands, that hasn’t worked for a while since the passwords are not stored using the MD5 algorithm anymore. Even the WordPress Codex has outdated methods, although it does include the method I have shown you.
Happy log-ins WordPress travelers!