Category: Snippets
Add a for “Logged-in”, “Logged-out”, and “All” Users selection to WordPress Navigation
Hi, with the following code snippet there will appear a selection dropdown in your WordPress Navigation’s Items that will hide them for logged-out, logged-in, or all users or more so show them to only the specified users. This code is extremely helpful for things like Login and Logout Links in your Navigation. Add to your…
Aggressively block all notifications in WordPress Backend
Hi, we wanted to reduce our plugin and instead of relying on one, we created the following snippet. It blocks every and all notices in the WP Backend (though that includes “Saved Post”, and other WP-own notifications). Add the following snippet to your functions.php, or via a Plugin.
Disable WordPress Link Security
WordPress’ native link security is really great, but can interfere, especially when you’re selling guest posts or banners. You can disable the link security features (nofollow, noreferrer) by implementing this code to your functions.php file, or via a Code Snippet Plugin. Be careful though, as this can interfere with your Website’s Security.
Add HTML Tags to Author Bio
WordPress, by default, disables the inclusion of HTML Tags in Author Bios for security reasons. You can alter this measure to allow low-risk tags, like <a> and <i>, f.ex. for the use of Font Awesome. To do so, add (or alter) this snippet to your functions.php file, or via a Code Snippet Plugin. In this…
Add HSTS and Preload via PHP Snippet
Hi, HSTS is a very strong security barrier that should be enabled on any WordPress Website using SSL and/or TLS. With this snippet, your HSTS Header is being set with a lifetime of one year. It also add HSTS Preload, which you can verify, once added to your functions.php file, by visiting https://hstspreload.org/. Add the…
Shortcode that lists all Plugins and Versions in a Table.
Hi, this very handy and extremely simple PHP Snippet creates a alphabetical list of all installed Plugins and their versions. To use, simply add [list_plugins] on any page, once you have enabled the following Code Snippet. Add it to your functions.php, or through a plugin like Code Snippets. Please disable this snippet once you have…
[Update] Link inline to categories automatically
Hey, we know how important internal linking is and wanted to automate a bit of the process. For that, we’ve added the following Code to do the following: To use this, simply add this code to your functions.php file, or by using a Plugin like Code Snippets. Newest Version This code adds a check to…
Set Viewport Meta via PHP Snippet
Hello, we’re using Divi as our main page builder over on gooloo.de and have seen, that there is missing a header for visually impaired people. This universal PHP Snippet sets the device width as the main width and enables scrolling up to 5x zoom into the page. Place it anywhere in your functions.php, or via…
Post List inspired by Spiegel.de
We really enjoy our SPIEGEL+ Membership and we’re genuinely in aw with the work they do on a daily basis, even when sometimes our opinion differ. We wanted to have a very basic version of how they style their posts in the DER SPIEGEL App on Android. We’re using here a dynamic shortcode with added…
Add PDF as E-Mail Attachment based on Subject
Hi, we were looking for a very simplistic code, that is not based on a Plugin specifically, but rather all E-Mails sent through the query. We’re now using this code. Explanation In $subject add specifically which subject line should be used. This needs to be an exact match. In $pdf_id add the media library item…