Since WordPress is a widely used platform, it is also a target for hackers. Adding security headers to your WordPress website can help increase its protection against potential security threats, such as cross-site scripting (XSS) attacks, cross-site request forgery (CSRF) attacks, and more. One way to add security headers is by using a code snippet […]
Category: Coding
How to Enable Shortcodes in WordPress Menus and Widgets
Shortcodes in WordPress allow users to easily add dynamic content, such as buttons, forms, or custom post types, to their posts, pages, and widgets. Imagine you want to show your related posts in the sidebar, social share icons in the navigation, or anything else you created a shortcode for. By default, WordPress does not support […]
How to Add an Admin User to WordPress via functions.php
Adding an admin user to your WordPress website can be helpful in many scenarios, such as when you need to grant someone access to your website or when you need to create a new administrator account. By default, adding an admin user requires logging into the WordPress dashboard and navigating to the user management area. […]
How to Add Google Analytics/Tag Manager to WordPress via functions.php
Adding Google Analytics or Tag Manager to your WordPress website is an important step in tracking website traffic and gathering valuable data. By default, you can add Google Analytics or Tag Manager to your WordPress website through a plugin or by inserting the tracking code directly into the header.php file. However, if you prefer not […]
Identify and add web browser name as body class using jQuery
There a few cases where you want to identify and target a specific web browser because for example you’re CSS isn’t rendering well on this particular browser. And I’m not point any fingers to a specific browser 👉 ..** IE ** .. 👈 Using the jQuery code snippet below you will add the used web […]
Add custom meta tags to HTML head via functions.php
Custom meta tags are an important part of a website’s SEO strategy. By adding custom meta tags to the HTML head of a WordPress website, website owners can control how their website is described and displayed in search engine results. Custom meta tags can also be used to add specific information to a website’s head, […]
8 rare HTML tags you didn’t know existed
Here are 8 HTML tags you probably didn’t know. And I believe it’s a good idea to use some of the tags in your next project for a better User Experience and Google indexing. <abbr> tag The first is the <abbr> tag. The tag defines an abbreviation or an acronym, like “HTML”, “CSS”, “Mr.”, “Dr.”, […]
Add a custom body class to your (Custom) Post Type
Custom body classes are a great way to add specific styles to different parts of your website. By adding custom body classes to your WordPress website, you can target specific areas of your website with CSS styles. In this tutorial, we will show you how to add a custom body class to your Custom Post […]
Simple ‘back to overview’ button with JavaScript
You’re probably here because you need a back button for your website and history.back(); just isn’t enough. But why use a button when you can use your browsers back button too. Well that’s easy. From A/B testing we noticed that every user has it’s own way to navigate your website. So it isn’t wrong to […]
Use WordPress shortcodes in (sidebar) widgets
You’re probably here because you noticed that your shortcode isn’t working, instead it’s just showing as text. No worries! This is by default. There is a quick fix for this. Imagine you want to show your related posts in the sidebar or social share icons in the navigation, or anything else that you created a […]