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...