Non-WC theme integration
-
Hello, I’m pretty new to WooCommerce and asking for a bit of help identifying my theme’s markup to add WC to my theme using hooks.
Following the below page’s guide, I’m having problems coming up with the code to put in my functions.php file.
https://docs.woothemes.com/document/third-party-custom-theme-compatibility/
My page.php code to help identify my theme’s markup
<?php get_header() ?> <!--MAIN PAGE AREA--> <div class="row-fluid" id="page-container"> <?php // get post meta $values = get_post_custom( $post->ID ); // get custom sidebar id for leftsidebar $left_sidebar_id = isset( $values['left_sidebar_sidebar'] ) ? esc_attr( $values['left_sidebar_sidebar'][0]) : 'sidebar1'; // get custom sidebar id for leftsidebar $right_sidebar_id = isset( $values['right_sidebar_sidebar'] ) ? esc_attr( $values['right_sidebar_sidebar'][0]) : 'sidebar2'; ?> <!-- left sidebar --> <?php if(is_active_sidebar($left_sidebar_id) && ( (get_post_meta($post->ID, 'wapo_sidebar_select', 1) == 'both')) || (get_post_meta($post->ID, 'wapo_sidebar_select', 1) == 'left') ){?> <div id="left-sidebar" class="span3"> <?php // print left sidebar if (!function_exists('dynamic_sidebar') || !dynamic_sidebar($left_sidebar_id)): endif; ?> </div> <?php } ?> <!-- Content --> <div id="content" class="<?php print get_content_span($post); if(!left_sidebar_exist($post) && right_sidebar_exist($post)) print ' no-left-yes-right ' ; if(left_sidebar_exist($post) && !right_sidebar_exist($post) ) print ' yes-left-no-right ' ;?>"> <div class="contentLeftRight-inner"> <?php while(have_posts()): the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class('cf'); ?>> <?php if(has_post_thumbnail()): ?> <div class="flexslider post-slideshow"> <ul class="slides"> <li> <?php $attachment_image_title = get_post(get_post_thumbnail_id()) ?> <?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large'); ?> <?php $attachment_post_details = get_post(get_post_thumbnail_id(), 'ARRAY_A'); ?> <a href="<?php echo $full_image[0]; ?>" rel="blogpostslideshow" class="blogpostimage" <?php if('' != $attachment_post_details['post_title']){ ?> title="<?php print $attachment_post_details['post_title']; }?>"> <?php the_post_thumbnail('page-featured'); ?> </a> <?php if('' != $attachment_post_details['post_title']){?> <p class="blog-post-flex-caption"><?php print $attachment_post_details['post_title'] ; ?></p><?php } ?> <div class="post-image-hover visible-desktop"> <div class="zoom-image"> <a href="<?php echo $full_image[0]; ?>" rel="blogpostslideshow" class="blogpostimage" <?php if('' != $attachment_post_details['post_title']){ ?> title="<?php print $attachment_post_details['post_title']; }?>"><img src="<?php print get_template_directory_uri() ?>/images/zoom-image.png " alt="<?php _e('Zoom', 'worthapost') ?>" /></a> </div> </div> </li> </ul> </div> <?php endif; ?> <div class="post-content"> <?php if(get_post_meta(get_the_ID(), 'wapo_page_title', 1) == FALSE && get_the_title() != '') { ?> <h1 class="title bordered"><?php the_title(); ?></h1> <?php } ?> <?php the_content(); ?> <?php wp_link_pages(); ?> </div> </article> <?php endwhile; ?> </div> </div> <!-- right sidebar --> <?php if(is_active_sidebar($right_sidebar_id) && ( (get_post_meta($post->ID, 'wapo_sidebar_select', 1) == 'both')) || (get_post_meta($post->ID, 'wapo_sidebar_select', 1) == 'right') ){?> <div id="right-sidebar" class="span3"> <?php // print right sidebar if (!function_exists('dynamic_sidebar') || !dynamic_sidebar($right_sidebar_id)): endif; ?> </div> <?php } ?> </div><!-- page-container --> <?php get_footer(); ?>
Thank you for your time.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Non-WC theme integration’ is closed to new replies.