CodeNskills

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

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 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

Country List in Contact Form 7 Dropdown

Contact Form 7 is a popular WordPress plugin that allows website owners to create custom forms. If you want to add a dropdown field for countries to your Contact Form 7 form, you can use the following list of country names: [select your-country “Aruba” “Afghanistan” “Angola” “Albania” “Andorra” “United Arab Emirates” “Argentina” “Armenia” “American Samoa” […]

PHP

How to disable Theme Editor and Plugin Editor in the WordPress admin panel?

The Theme Editor and Plugin Editor in the WordPress admin panel allow users to directly edit the code of themes and plugins, which can be a security risk if a user with malicious intent gains access to your WordPress site. Therefore, it is recommended to disable the Theme Editor and Plugin Editor in the WordPress […]

PHP

WooCommerce Structured Data Product

WooCommerce provides structured data for products out-of-the-box, which can help search engines like Google better understand and display information about your products in search results. Here’s how to access and customize the structured data for products in WooCommerce: To use these filters, you can add your own functions to your theme’s functions.php file or a […]

PHP

Hot to Register Widget in WordPress by Hook

To register a widget in WordPress using a hook, you can use the widgets_init hook. Here’s an example code snippet that demonstrates how to register a custom widget:

PHP

Change Loop Thumbnail HTML in shop page Woocommerce

To change the loop thumbnail HTML in the shop page of WooCommerce, you can use the woocommerce_before_shop_loop_item_title hook. This hook is used to add content before the product title in the loop. Here’s an example code snippet that demonstrates how to change the loop thumbnail HTML in the shop page of WooCommerce:

PHP

WP Custom Post Type Query In WordPress

WordPress provides a function called WP_Query() to fetch custom post types based on specific criteria. Here’s an example of how to fetch custom post types with the WP_Query() function: In the above example, the post_type the parameter is set to the name of the custom post type that you want to fetch. Other parameters are […]

PHP