Documentation

CSS Framework

CSS
https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css
JS Bundle
https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js
JS Separate
https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js
https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.min.js

Theme files

- header.php //  use to declare header codes
- footer.php // use to declare footer codes
- index.php // indexing, generally used to create blog layouts
- page.php // page content
- style.css // theme declaration
- functions.php // theme functions/ activity
-- cpt.php // use to declare custom post types, e.g portfolio, members, team, events etc
-- customize.php // to create dynamic content e.g analytics script/ marketing
-- enqueues.php // path to stylesheets or scripts
-- navbar.php // navbar/ menus
-- theme-setup.php // use to declare theme needs e.g read more/ excerpt, number of views and mixups
- assets/ css // css files
- assets/ js // js files

SEO/ Analytics ready

Go to appearance – customize
Header Setting- Can add scripts for header, e.g. Google Analytics
Footer Setting- Can add scripts for footer e.g. marketing/ tracking scripts

Navbar

If there is a child menu, make parent menu through custom link and link as #, to make parent menu clickable, as per the responsive standards there should not be a link in parent menu, it should be a null link, on click it will show a dropdown which will have child menus.
– can change codes as per your requirement in theme files ‘navbar.php’

https://getbootstrap.com/docs/5.0/components/navbar/

How to create custom post types (cpt) ?

e.g. here custom post type is projects

function codex_custom_init() {

      register_post_type(
        'Projects', array(
          'labels' => array('name' => __( 'Projects' ), 
          'singular_name' => __( 'Projects' ) ),
          'public' => true,
          'has_archive' => true,
          'supports' => array('title', 'editor', 'thumbnail'),
          'menu_icon' => 'dashicons-admin-generic',
		   
        )
      );
	  
    }
    add_action( 'init', 'codex_custom_init' );

How to declare WooCommerce support?

add these lines in functions of your choice, preferred ‘theme-setup.php’

//woo integration
function mytheme_add_woocommerce_support() {
  add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );

//remove uncategorided woo
add_filter( 'woocommerce_product_subcategories_args', 'remove_uncategorized_category' );
add_filter( 'woocommerce_product_categories_widget_args', 'remove_uncategorized_category' );
/**
 * Remove uncategorized category from shop page.
 *
 * @param array $args Current arguments.
 * @return array
 **/
function remove_uncategorized_category( $args ) {
  $uncategorized = get_option( 'default_product_cat' );
  $args['exclude'] = $uncategorized;
  return $args;
}
//enable woo gallery
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );

create a page, named as ‘woocoomerce.php’ in theme files and add a class ‘woocommerce’ in your column

<div class="col-sm-12 woocommerce">
      <div class="py-3"><?php woocommerce_content(); ?></div>
</div>

Theme Development

https://codex.wordpress.org/Theme_Development