by Molly Roberts | May 26, 2022 | How-To
Thousands of websites get hacked every day. Yours might be next. Even if you are using WordPress, there is a chance that your website can get hacked. Most of the reasons why websites get hacked can be easily prevented. You can secure your WordPress website even if you...
by Molly Roberts | May 28, 2022 | WordPress Code Snippets
By default, WordPress displays the Admin Bar for any user who signs in. This includes Subscribers, Editors, Authors, and any other custom user role you might add. If you want to display the admin bar only to the administrator users of your site, then you only need a...
by Molly Roberts | May 28, 2022 | WordPress Code Snippets
WordPress allows you to create image galleries in your blog posts without any third-party plugins. Do you want to style a post differently if it has a gallery? There’s an easy way to know if a post has a gallery inside it and yes, it works inside The Loop as...
by Molly Roberts | May 27, 2022 | WordPress Code Snippets
WordPress converts emoticons like “:)” into image-based emojis. The scripts required for this might slow down your website. Or maybe you just don’t want emojis on your website at all. You can disable emojis completely in WordPress by disabling the...
by Molly Roberts | May 27, 2022 | WordPress Code Snippets
WordPress offers easy ways to query posts. There are dozens of conditions you can apply to query posts. Today, I will show you an easy way to query and display posts published this month. Here’s the code you can use: $posts = get_posts(array(...
by Molly Roberts | May 27, 2022 | WordPress Code Snippets
Posts in WordPress are hierarchical and can have ancestors (Parents). If you have posted on your blog with ancestors, you might want to display a list of ancestors of the posts. There’s an easy way to do it. Use this code snippet inside your theme’s...
by Molly Roberts | May 27, 2022 | WordPress Code Snippets
WordPress doesn’t allow using Shortcodes in the titles of your widgets by default. But there’s an easy way to enable the processing of shortcodes inside widget titles. Place this code snippet in your theme’s functions.php file to enable shortcodes in...
by Molly Roberts | May 27, 2022 | WordPress Code Snippets
If you want to speed up your WordPress website, you might want to move jQuery to the footer of your website. If it’s right before the closing </body> tag, then the browser will load it after all the content has been loaded. This will make sure your users see...
by Molly Roberts | May 27, 2022 | WordPress Code Snippets
The Media Library page in the WordPress admin dashboard doesn’t display the Attachment ID of the images. If you want to display the attachment ID of the images in the Media Library, then you can add this code to your functions.php file: // Adds a new column...
by Molly Roberts | May 27, 2022 | WordPress Code Snippets
Do you want to enforce a color theme for all admin users? You can enforce a color scheme for all WordPress admin area users using a simple PHP code snippet. Paste the following code in your theme’s functions.php file: function force_admin_area_color_scheme() {...