In Next.js, a page is a React Component exported from a file in the pages directory. Pages are associated with a route based on their file name. For example, in development: pages/index.js is associated with the / route. pages/posts/first-post.js is associated with the /posts/first-post route. Create a New Page Create the posts directory under pages. Create a… Continue reading How to navigate between pages in Nextjs
Category: Wordpress
categories fetch
To fetch categories, you usually need to request each category individually by its unique ID. So, to fetch multiple categories, you would need to make separate API requests for each category. We create an array of category IDs from the post.categories array. We use Promise.all to concurrently fetch each category by making individual API requests… Continue reading categories fetch
Create a plugin in WordPress
Create a New Folder:In the wp-content/plugins directory of your WordPress installation, create a new folder for your plugin. Name it something unique and descriptive. For this example, let’s call it test-plugin. Create the Main Plugin File:In the wp-content/plugins directory of your WordPress installation, create a new folder for your plugin. Name it something unique and… Continue reading Create a plugin in WordPress
How to change image on dark/light mode in Nextjs
In Nextjs we can change the images according to the dark mode or light mode. The display property can be used to toggle images according to mode change. Provided that the theme provider class is installed in your project, and that the dark /light mode is working fine, then the following code can be used… Continue reading How to change image on dark/light mode in Nextjs
Bbpress plugin
bbPress is intentionally simple yet infinitely powerful forum software. bbPress is easy to integrate, easy to use, and is built to scale with the growing community. To install bbpress From your WordPress dashboard Visit ‘Plugins > Add New’ Search for ‘bbPress’ Activate bbPress from your Plugins page. (You will be greeted with a Welcome page.)… Continue reading Bbpress plugin
How to use ‘he’ library in Nextjs
he (for “HTML entities”) is a robust HTML entity encoder/decoder written in JavaScript. It supports all standardized named character references as per HTML, handles ambiguous ampersands and other edge cases just like a browser would, has an extensive test suite, and — contrary to many other JavaScript solutions — he handles astral Unicode symbols just… Continue reading How to use ‘he’ library in Nextjs
php wp_footer and php get_footer
<?php wp_footer(); ?> and <?php get_footer(); ?> are both PHP functions used in WordPress templates, but they serve different purposes: <?php wp_footer(); ?>: Purpose: This function is used to insert essential scripts and styles in the footer of your WordPress site. Usage: It’s typically placed in the footer.php file of your theme, just before the… Continue reading php wp_footer and php get_footer
phpMyAdmin: How to Convert tf8_general_ci Database to utf8mb4_unicode_ci
Back up your WordPress database. Go to your WordPress folder and open your wp-config.php file using Text Editor. Find this line: define(‘DB_CHARSET’, ‘utf8′); Change the utf8 text to utf8mb4 then save the file. If utf8mb4 is already set in your wp-config.php continue with the next step. Follow the instructions in the image below. 3. Log into your phpMyAdmin using your MariaDB 10… Continue reading phpMyAdmin: How to Convert tf8_general_ci Database to utf8mb4_unicode_ci
what is Perfmatters Plugin in wordpress
Perfmatters is a WordPress plugin designed to help website owners improve the performance and speed of their WordPress websites. Perfmatters offers various features and optimizations to enhance website performance, such as: Script and Asset Control: It allows you to disable unnecessary scripts and assets on a per-page basis, reducing the number of HTTP requests and… Continue reading what is Perfmatters Plugin in wordpress
What is Plugin Organizer plugin in WordPress
The “Plugin Organizer” plugin for WordPress is a tool that allows you to manage and control the activation of plugins on your WordPress website. Here’s how it typically works: Plugin Priority: Plugin Organizer lets you set the priority of individual plugins. This means you can determine the order in which plugins are loaded on your… Continue reading What is Plugin Organizer plugin in WordPress