Coding

How to Create Custom Post Types in WordPress

Open your functions.php file of your active child theme (or theme) and add the code below to it. Make sure the code is added before the closing PHP tag. I will explain the code below. add_action( ‘init’, ‘ls_register_post_types’ ); function ls_register_post_types() { register_post_type( ‘cst_new’, array( ‘labels’ => array( ‘name’ => ‘News’, ‘singular_name’ => ‘news’ ),

How to add color filter in woocommerce

step 1 : Open your functions.php file of your active child theme (or theme) and add the code below to it. Make sure the code is added before the closing PHP tag. // Register a custom taxonomy for color add_action(‘init’, ‘custom_taxonomy_color’); function custom_taxonomy_color() { $labels = array( ‘name’ => _x(‘Colors’, ‘taxonomy general name’, ‘textdomain’), ‘singular_name’

Scroll to Top