From 1e98d71679a12fcdd463c77cf5bb08af6c1f4dca Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 30 Jun 2016 15:27:14 -0400 Subject: [PATCH] Inserting the adrotate image for product sidebar Every tour/product page has the sidebar, which will henceforth display an ad as set up in the admin side. This ad is located below the experiences and category display, and is text-centered. --- css/app.css | 4 ++++ functions.php | 14 ++++++++++---- scss/_sidebar.scss | 4 ++++ sidebar.php | 26 ++++++++++---------------- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/css/app.css b/css/app.css index 5729f6a..e3d0fae 100644 --- a/css/app.css +++ b/css/app.css @@ -7930,6 +7930,10 @@ input[type="submit"].blogbutton { .current_page_item a { font-weight: bold; } +#ads_sidebar_container li { + list-style: outside none none; + text-align: center; } + .search-top #searchform { text-align: left; display: inline-block; diff --git a/functions.php b/functions.php index 26469fb..4288d01 100644 --- a/functions.php +++ b/functions.php @@ -15,11 +15,17 @@ if (!function_exists('glm_quicksite_widget_init')) { function glm_quicksite_widget_init() { + register_sidebar(array( + 'name' => 'Tour Sidebar Ad', + 'id' => 'shopsidead', + 'description' => __('Tour Ad Area') + )); register_sidebar(array( 'name' => __('Slideshow'), 'id' => 'slideshow', 'description' => __('Meta Slider/Slideshow Area') )); + } } @@ -84,10 +90,10 @@ function woo_product_inquiry_content() { echo do_shortcode('[gravityform id="3" title="true" description="true"]'); } -function woo_itinerary_content() { - global $product; - echo the_field('itinerary'); -} +//function woo_itinerary_content() { +// global $product; +// echo the_field('itinerary'); +//} function woo_photos_content() { global $product; diff --git a/scss/_sidebar.scss b/scss/_sidebar.scss index b64cf19..8bf8dc2 100644 --- a/scss/_sidebar.scss +++ b/scss/_sidebar.scss @@ -128,4 +128,8 @@ } .current_page_item a { font-weight: bold; +} +#ads_sidebar_container li { + list-style: outside none none; + text-align: center; } \ No newline at end of file diff --git a/sidebar.php b/sidebar.php index 629c221..906ac87 100644 --- a/sidebar.php +++ b/sidebar.php @@ -1,11 +1,3 @@ -ID; - $product_meta = new WC_Product($id); - $sku = $product_meta->get_sku(); - $title = $product_meta->get_title(); - $title = str_replace(' ', '-', $title); -?> - @@ -44,15 +36,17 @@ $all_categories = get_categories( $args ); - +
+ + +
---> -- 2.17.1