|

Dependency between “custom post type” and “custom fields” in WordPress

In WordPress, a custom post type and custom fields are related in the sense that custom fields are used to store additional information about the custom post type. Here’s an example of how the dependency works: In this way, custom fields provide a way to add additional information to custom post types in a structured…

|

Create custom fields for a custom post type in WordPress to use in functions.php

To create custom fields for a custom post type in WordPress, you can use the add_meta_box function. Here’s an example of how you can use this function to create a custom field for a custom post type called “book”: You can add more fields as per your requirement and use in the display_book_custom_fields function. Here’s…

|

Create a custom post type called “Books” in WordPress to use in functions.php

Here is an example of how you can create a custom post type called “Books” in WordPress using the register_post_type function in your theme’s functions.php file: This code creates a new post type called “Books” and adds it to the WordPress admin interface. The labels array sets the labels for the post type in the…

How to Clean-up WordPress Installation

// Add Code to functions.php // //remove emoji support remove_action(‘wp_head’, ‘print_emoji_detection_script’, 7); remove_action(‘wp_print_styles’, ‘print_emoji_styles’); // // Remove rss feed links remove_action( ‘wp_head’, ‘feed_links_extra’, 3 ); remove_action( ‘wp_head’, ‘feed_links’, 2 ); // // remove wp-embed add_action( ‘wp_footer’, function(){ wp_dequeue_script( ‘wp-embed’ ); }); add_action( ‘wp_enqueue_scripts’, function(){ // // remove block library css wp_dequeue_style( ‘wp-block-library’ ); // //…