It’s because of cart sessions clear past sesstions in below path
wp-admin –> WooCommerce –> Status –> Tools –> Clear all sessions
And because of missing code in cart page please find below code should be available in cart.php
<?php wp_nonce_field( ‘woocommerce-cart’ ); ?>
Please find below code to get default post category
$args = array(
‘type’ => ‘post’,
‘hide_empty’ => 0
$categories = get_categories( $args );
echo $default_category = get_option(‘default_category’);
If this issue getting you have to increase max_allowed_packet in MySQL ini file
xampp –> mysql –> my.ini
max_allowed_packet = 1M –> max_allowed_packet = 16M
- You will create two files header.php and footer.php.
- Create a folder “include” in your theme directory.
- Suppose that your theme directory is “aviweb” sites/all/themes/aviweb. Put header.php and footer.php file in “sites/all/themes/aviweb/include” theme folder.
- By using html and php you can write code in header.php and footer.php.
- Now you can include both files in page.tpl.php in header area and footer area like PHP.
<?php include_once($theme_path.’/include/header.php’); ?>
<?php include_once($theme_path.’/include/footer.php’); ?>
To create front page template please find below steps
- Create “page–front.tpl.php” template in current theme and copy the home page PHP code into that.
- Next create one “Home” page and Promote as front page like below screenshot.
- Once we done above steps it will work as front page with “page–front.tpl.php” code.