/*
Theme Name:     Twenty Twelve Child
Theme URI:      http://example.com/
Description:    Child theme for the Twenty Twelve theme
Author:         Your name here
Author URI:     http://example.com/about/
Template:       twentytwelve
Version:        0.1.0
*/
@import url("../twentytwelve/style.css");

.site-header {
    margin-top: -24px;
    padding: 0;
}
body .site {
    border: 1px solid #333;
}
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
background-repeat: no-repeat;
background-attachment: fixed;
background: #baddf3;
background: -moz-linear-gradient(top, #baddf3 0%, #ffffff 100%) fixed;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#baddf3), color-stop(100%,#ffffff)) fixed;
background: -webkit-linear-gradient(top, #baddf3 0%,#ffffff 100%) fixed;
background: -o-linear-gradient(top, #baddf3 0%,#ffffff 100%) fixed;
background: -ms-linear-gradient(top, #baddf3 0%,#ffffff 100%) fixed;
background: linear-gradient(to bottom, #baddf3 0%,#ffffff 100%) fixed;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#baddf3', endColorstr='#ffffff',GradientType=0 );
}
#page {
padding-left:0!important;
padding-right:0!important;
max-width:1000px;
}

header hgroup, #main, footer[role="contentinfo"], nav.main-navigation {
padding-left:20px;
padding-right:20px;
}

img.header-image {
border-radius:0;
align: center;
}
.entry-content img,
.comment-content img,
.widget img,
img.header-image,
img.wp-post-image {
    border-radius:0;
    box-shadow:0 0 0 rgba(0,0,0,0);
}
.main-navigation li ul li a:hover {
		background: #e3e3e3;
		color: #444;
	}
	.main-navigation .current-menu-item > a,
	.main-navigation .current-menu-ancestor > a,
	.main-navigation .current_page_item > a,
	.main-navigation .current_page_ancestor > a {
		color: #baddf3;
		font-weight: bold;
	}

.main-navigation ul.nav-menu,
.main-navigation div.nav-menu > ul {
	border-bottom:0;
	border-top:0;
}

.main-navigation {
	background-color: #878787;
	margin-top: -3px;
	text-align: center;
}

.main-navigation li a:hover {
	color: #baddf3;
	font-weight: bold;
}

.main-navigation li a {
	color: #ffffff;
	font-weight: bold;
}


#colophon {
	border: 0;
}

.site-content article {
	padding-bottom: 0;
	margin-bottom: 0;
	border-bottom: 0;
}
.boxed {
  border: 1px solid black ;
  margin-left: 400px;
}
.woocommerce .woocommerce-breadcrumb {
display: none;
}

entry-content td, .comment-content td
{
  border-top-width: 0px;
  border-top-style: solid;
  border-top-color: #ffffff;
  padding-top: 6px;
  padding-right: 10px;
  padding-bottom: 6px;
  padding-left: 0px;
}

.col2 { margin-top: -20px; }

<?php
/*
Plugin Name: Add custom product info to Additional Information tab
Plugin URI: https://www.damiencarbery.com/2020/03/add-custom-product-info-to-additional-information-tab/
Description: Use CMB2 to add a custom metabox to WooCommerce product then add data to Additional Information tab on product page.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.3
*/


add_action( 'cmb2_admin_init', 'dcwd_wc_book_info_fields_metabox' );
function dcwd_wc_book_info_fields_metabox() {
	$cmb = new_cmb2_box( array(
		'id'            => 'book_info',
		'title'         => 'Book Information',
		'object_types'  => array( 'product', ), // Post type
		'context'       => 'side',
		'priority'      => 'default',
		'show_names'    => true, // Show field names on the left
	) );
	$cmb->add_field( array(
		'name'        => 'ISBN13',
		'id'          => 'isbn13',
		'type'        => 'text',
		/*'attributes' => array(
			'required' => 'required',
		),*/
	) );
	$cmb->add_field( array(
		'name'        => 'ISBN10',
		'id'          => 'isbn10',
		'type'        => 'text',
		/*'attributes' => array(
			'required' => 'required',
		),*/
	) );
	$cmb->add_field( array(
		'name'        => 'Pages',
		'id'          => 'pages',
		'type'        => 'text_small',
		'attributes' => array(
			'type' => 'number',
			'pattern' => '\d*',
			//'required' => 'required',
		),
		'sanitization_cb' => 'absint',
			'escape_cb'   => 'absint',
	) );
	$cmb->add_field( array(
		'name'        => 'Author',
		'id'          => 'author',
		'type'        => 'text',
		/*'attributes' => array(
			'required' => 'required',
		),*/
	) );
	$cmb->add_field( array(
		'name'        => 'Publisher',
		'id'          => 'publisher',
		'type'        => 'text',
		/*'attributes' => array(
			'required' => 'required',
		),*/
	) );
	$cmb->add_field( array(
		'name'        => 'Publish Date',
		'id'          => 'publish_date',
		'type'        => 'text_date',
		/*'attributes' => array(
			'required' => 'required',
		),*/
	) );
}


// Add the book information to the Additional Information tab.
add_action( 'woocommerce_product_additional_information', 'dcwd_book_info_in_additional_info_tab', 20 );
function dcwd_book_info_in_additional_info_tab( $product ) {
	$product_post_meta = get_post_meta( $product->get_id() );

	// Post meta field => Label.
	$book_info_fields = array( 'isbn13' => 'ISBN13', 'isbn10' => 'ISBN10',
							   'pages' => 'Pages', 'author' => 'Author',
							   'publisher' => 'Publisher', 'publish_date' => 'Publish Date' );
	$book_info = array();
	foreach ( $book_info_fields as $key => $label ) {
		if ( array_key_exists( $key, $product_post_meta ) ) {
			// Display the label and then the data.
			$book_info[] = sprintf( '<strong>%s</strong>: %s', $label, $product_post_meta[ $key ][ 0 ] );
		}
	}
	echo '<p>', implode( '<br />', $book_info ), '</p>';