Uncategorized
Create Laravel Models, Controllers,Migrations,Resrouces and more
This command will create: Summary In Laravel 10, you can use the Artisan command-line tool to automatically generate controllers, models, routes, and resource views for typical CRUD operations. Here’s a step-by-step guide to accomplish this: Step 1: Create a Model and Migration First, create a model along with a migration file using the Artisan command: […]
How to Set Up WordPress Multi-Site on Cloudways
After Setting Up a new Server with Multi-Site Capabilities, login to your WordPress Dashboard and navigate to Tool and select Network Setup. Click on deactivate your plugins (in the warning message as seen below). Select Plugins, then select Deactivate and click the Apply button. Going Back to Tool and select Network Setup page. Choose the […]
Enable & Use HTTP/2 with Digital Ocean LAMP
Required: An Ubuntu 22.04 LAMP server or any LAMP server running Apache 2.4.26 or higher Enable HTTP/2 on Apache First check the Version of Apache by using this command in your terminal. Enable HTTP2 Open your website’s configuration file (replace domain.com with your domain name): Just below the <VirtualHost *:443> tag, type or copy/paste the following code: To apply the changes, restart Apache web […]
Use FontAwesome Icons on WP Admin Panel
To replace a WordPress admin menu icon with a FontAwesome icon, you cannot directly use the menu_icon parameter because it only supports Dashicons out of the box. Instead, you will need to use custom CSS to apply a FontAwesome icon. Here’s how you can do it: 2. Add Custom CSS to Replace the Icon: You […]
Add A CSS Style Sheet For WP Admin Section
1. Define $theme_version within the function You can define $theme_version within your function by getting the current theme’s version using the wp_get_theme() function: 2. Use a static value for the version If you prefer not to dynamically fetch the theme version, you can simply use a static value like ‘1.0.0’ or increment it whenever you […]
Show WordPress Posts that belong to two or more custom taxonomies
You can achieve this by using the tax_query parameter in a custom WP_Query loop. Here’s how you can do it: Replace ‘taxonomy_name_1’, ‘taxonomy_name_2’, ‘term_slug_1’, and ‘term_slug_2’ with the actual names and slugs of your taxonomies and terms. This query will find posts that belong to both taxonomies specified in the tax_query array. You can adjust […]
