CodeNskills

Insights and Tips on Web Development

Explore our methods and view of the web’s evolution.

How to use group_concat in SQL

the GROUP_CONCAT function is used to concatenate values from multiple rows into a single string, grouped by a specified column. This function is commonly used in scenarios where you want to combine multiple related values into a single result. The syntax for using GROUP_CONCAT is as follows:

Database

How to Modify Gravity Forms Country by Hook

This example demonstrates how to limit the country drop down to only a few select countries. This example demonstrates how to add new countries to the list.

PHP

Some Usefull Laravel Command

Laravel is a popular PHP web application framework that provides a set of useful features and tools for developing modern web applications. Here are some of the most commonly used Laravel commands: These are just a few examples of the many commands available in Laravel. Each command is designed to simplify common development tasks and […]

PHP

How to set canonical tag dynamic url in javascript?

To set a dynamic canonical tag URL using JavaScript, you will need to retrieve the URL of the current page and use it to dynamically set the href attribute of the canonical link element. Here is an example: In this example, we retrieve the URL of the current page using window.location.href and store it in […]

Javascript

How to get the current page URL in PHP?

In PHP, you can get the current page URL by accessing the $_SERVER superglobal variable, which contains information about the current request. Specifically, you can use the ‘REQUEST_URI’ key to get the URL of the current page, as shown in the following example: This code first checks if the request was made over HTTPS using […]

PHP

How To Make Cart Price Custom HTML

To make the cart price display custom HTML in WooCommerce, you can use a filter hook provided by WooCommerce called woocommerce_cart_item_price. This hook allows you to modify the price output of items in the cart with your own custom HTML. Here is an example code snippet you can use to get started: Either you can […]

PHP

How To Make Dynamic HTML Sitemap in Shopify

To make a dynamic HTML sitemap in a Shopify template, you can follow these steps: This code uses a for loop to iterate over the links in the “main-menu” link list and generates a list of links with their titles and URLs. Note: If you want to customize the sitemap further, you can modify the […]

PHP

How to add Email Recipient Add Woo Commerce

If you want to add an email recipient for order notification emails in WooCommerce, you can use the following code: This code adds an email address to the recipient list for the “New Order” notification email in WooCommerce. You can replace “email@example.com” with the email address you want to add. If you want to add […]

PHP