how to create google sheet and fetch data json

Create the Google Sheet First, let’s set up a well-structured product data sheet: Column Headers (Row 1): Product ID Product Name Category Price Stock Description Make Sheet Publicly Accessible Click Share button (top right) Click Change to anyone with the link Set permission to Viewer Copy the sheet URL 3. Get Your Sheet ID From […]

full guide for creating a “Book” Custom Post Type (CPT) in WordPress

1. Register Book Custom Post Type File: functions.php of your child theme (hello-elementor-child/functions.php) <?php // Register Book CPT function hello_register_book_cpt() { $labels = array( ‘name’ => _x(‘Books’, ‘Post Type General Name’, ‘hello’), ‘singular_name’ => _x(‘Book’, ‘Post Type Singular Name’, ‘hello’), ‘menu_name’ => __(‘Books’, ‘hello’), ‘name_admin_bar’ => __(‘Book’, ‘hello’), ‘add_new_item’ => __(‘Add New Book’, ‘hello’), ‘edit_item’ […]

Custom Taxonomy in WordPress (custom post type)

What Are Taxonomies in WordPress? Taxonomy is a way of classifying and organizing content. By default, WordPress provides three built-in taxonomies: categories, tags, and post formats. However, these may not always be sufficient to meet the specific requirements of every website. What is Custom Taxonomy? Custom taxonomy, as the name suggests, allows you to create and define your own […]

How to Create Custom Post Types in WordPress

CPTs are the correct way to model content beyond posts/pages (products, events, recipes, portfolios, etc.). Below I’ll give a clean, production-ready recipe: concept + example plugin code you can drop in, best practices, and how to make templates and REST/Gutenberg-ready. Quick checklist (what “proper” means) Register CPT on init hook. Use register_post_type() with complete labels […]

How to create custom taxonomies in WordPress

Using plugins to create custom taxonomies Plugins make everything easy and creating a custom taxonomy is no exception. You don’t need any technical knowledge to do it. The recommended plugins for creating custom taxonomies are Custom Post Types UI and Pods. Let’s try using the former for the example. Install and activate Custom Post Types UI Head […]

what is Taxonomy in WordPress

What Is WordPress Taxonomy? WordPress Taxonomy is a way of grouping and organizing content types into categories and tags, making it easier for users to navigate a website. Taxonomies in WordPress include categories, tags, and custom taxonomies, which can be customized to meet specific website needs. Types of WordPress taxonomies In total, there are four […]

how to add a php page in wordpress as template

1. Create Your PHP Template File Go to your active theme folder (usually in wp-content/themes/your-theme/). Create a new PHP file, e.g., custom-template.php. 2. Add a Template Header Comment At the top of your PHP file, you must include a special comment so WordPress recognizes it as a template: <?php /* Template Name: Custom Template Description: […]

picture attachment in meta box

ID, ‘_defective_products’, true) ?: []; $pieces = get_post_meta($post->ID, ‘_defective_pieces’, true) ?: []; $invoice_no = get_post_meta($post->ID, ‘_defective_invoice_no’, true); $invoice_date = get_post_meta($post->ID, ‘_defective_invoice_date’, true); $notes = get_post_meta($post->ID, ‘_defective_notes’, true); $claim_amount = get_post_meta($post->ID, ‘_defective_claim_amount’, true); $pictures = get_post_meta($post->ID, ‘_defective_pictures’, true) ?: []; $cover_letter = get_post_meta($post->ID, ‘_defective_cover_letter’, true); ?> } // Save handlerfunction save_defective_goods_meta_box($post_id) {if (!isset($_POST[‘defective_goods_meta_box_nonce’]) || !wp_verify_nonce($_POST[‘defective_goods_meta_box_nonce’], ‘defective_goods_meta_box_action’)) […]

How to Add an AJAX “Load All Posts” Button in WordPress

What is AJAX in WordPress? AJAX stands for Asynchronous JavaScript and XML. In your example: Add the Button in Your Page or Template Place this button wherever you want users to trigger the post loading: Add JavaScript to Handle the Click Update your custom/custom.js file with the following code: Explanation: Add PHP AJAX Handler In […]

custom meta box in wordpress

A custom meta box in WordPress is basically an extra content box that you can add to the post, page, or custom post type editing screen inside the WordPress admin. How it Works // 1. Add custom meta boxfunction my_custom_meta_box() {add_meta_box(‘movie_details’, // ID‘Movie Details’, // Title‘my_custom_meta_box_callback’, // Callback‘movies’, // Post type‘normal’, // Context‘high’ // Priority);}add_action(‘add_meta_boxes’, […]