By default, WordPress doesn’t come with suspicious login notifications and two factor authentication. We use plugins (or custom code) for these things. This piece of code notifies you when a user logs in to your site. Good for websites with few users.
WordPress is by far the most popular content management system in the world. So, naturally, I love it and have quite a bit to say about it. My WordPress posts may be slightly biased towards code hacks (as opposed to simpler configuration tweaks), but well, I'm a software guy... So, no apologies.
The developers of the JetPack WordPress plugin decided to put a layer above the featured image thumbnails of “related posts”. This gives the images a faded look which you may not like. The CSS snippet shared here will help you disable this feature.
As of PHP 7.2 create_function() has been deprecated because of its usage of eval() – which in itself is a security hole. Even though applications that use create_function() may still work, you should replace it with an anonymous function instead.
AJAX has become THE way to build user friendly and dynamic websites. With AJAX, you can update the contents of a page without doing a full page reload. Most websites need this behavior. Read this post to learn how to implement AJAX on WordPress sites.
Code snippets to restrict authors and contributors of multi-author WordPress websites. The first piece of code prevents them from seeing content assigned to other users. The second ensures that users can only see post counts of their own content.
“Echo” is a very handy PHP language construct used to output one or more strings. But echo writes to output directly. So it isn’t very straightforward to save the output of echo into a variable for later use. To do this, you need PHP output buffering.