Tag: WordPress
What are the benefits of PHP 8.1 and the Commands to upgrade from an older version on Nginx?
PHP 8.1 is the latest version of the popular server-side scripting language, and it brings a host of new features and improvements that make it a compelling choice for developers. In this article, we’ll highlight some of the key benefits of upgrading to PHP 8.1.
How to add the logged-in user’s roles as classes in the body element in WordPress
To add the user roles to the body of your WordPress pages, you can use the body_class hook. This hook allows you to add custom classes to the <body> element of your pages. Example of body_class hook to add classes to the body element Here’s an example of how you can use this hook to…
How to add custom CSS to the admin area in WordPress
1.- Create a css file in your custom theme where you want to add the styling. 2.- Implement the admin_enqueue_scripts action in a custom plugin or the functions.php file of your theme, like this:
How to redirect users after they login based on their role on WordPress
If your WordPress site/project needs the users to be redirected to different pages after they successfully login, based on their roles, you can use a plugin or the code below
How to add/remove/update the tabs in the WooCommerce My Account page
The WooCommerce plugin has the shortcode [woocommerce_my_account] available which one can embed in any page to display to the logged in customers all the information related to their past orders, addresses, payment details and more, based on the plugins that you may have installed in the site. The shortcode outputs the data organized by tabs…
How to setup a WordPress or Drupal site locally with ddev
DDEV is an open source tool that allows setting up local sites using docker, quickly. You will learn from my experience with it about how to use it, and some helpful commands.
How to get 100/100 on Google PageSpeed Insights with a WordPress site and the page builder Elementor
I wanted to check if it is possible to get a perfect score of 100/100 on Google PageSpeed Insights with a website built with WordPress, the page builder Elementor and the Astra theme.I decided to build my own website https://davidloor.com/ using WordPress with Elementor and following the recommendations that I will describe below, my website…
How to set-up a Drupal or WordPress site locally using Docker
This article is not aiming to provide explanations about the tools that I use to set-up Drupal/WordPress sites, I think there is a lot of information available on the internet about them Docker, Traefik, Compose. The only goal of this post is to document the process that I follow since it is really easy, and…