-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-ride.php
107 lines (96 loc) · 3.39 KB
/
sidebar-ride.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
/**
* The Sidebar containing the main widget areas.
*
* @package GeneratePress
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
<div class="widget-area sidebar is-right-sidebar">
<div class="inside-right-sidebar inside-sidebar-ride">
<?php
/**
* generate_before_right_sidebar_content hook.
*
* @since 0.1
*/
// do_action( 'generate_before_right_sidebar_content' );
?>
<div class="widget inner-padding widget_block ride-ratings">
<h3 class="sidebar-heading">Ride Ratings</h3>
<div class="grid">
<div class="rating-container">
<h4 class="rating-title">Overall</h4>
<div class="rating-level">
<? $overall = get_field('rating-overall'); ?>
<? //echo $overall; ?>
<? echo get_star_rating($overall); ?>
</div>
</div>
<div class="rating-container">
<h4 class="rating-title">Enjoyment</h4>
<div class="rating-level">
<? $enjoyment = get_field('rating-enjoyment'); ?>
<? //echo $enjoyment; ?>
<? echo get_star_rating($enjoyment); ?>
</div>
</div>
<div class="rating-container">
<h4 class="rating-title">Scenery</h4>
<div class="rating-level">
<? $scenery = get_field('rating-scenery'); ?>
<? //echo $scenery; ?>
<? echo get_star_rating($scenery); ?>
</div>
</div>
<div class="rating-container">
<h4 class="rating-title">Tourism</h4>
<div class="rating-level">
<? $tourism = get_field('rating-tourism'); ?>
<? //echo $tourism; ?>
<? echo get_star_rating($tourism); ?>
</div>
</div>
</div>
</div>
<div class="widget inner-padding widget_block ride-map">
<?
$image = get_field('ride_map');
$size = $image['sizes'][ 'medium' ];
if( !empty( $image ) ): ?>
<a href="<?php echo esc_url($image['sizes'][ 'large' ]); ?>" data-featherlight="image"><img class="img-fluid" src="<?php echo esc_url($size); ?>" alt="<?php echo esc_attr($image['alt']); ?>"></a>
<?php endif; ?>
</div>
<div class="widget inner-padding widget_block ride-elevation">
<?
$image = get_field('elevation');
$size = $image['sizes'][ 'medium' ];
if( !empty( $image ) ): ?>
<a href="<?php echo esc_url($image['sizes'][ 'large' ]); ?>" data-featherlight="image"><img class="img-fluid" src="<?php echo esc_url($size); ?>" alt="<?php echo esc_attr($image['alt']); ?>"></a>
<?php endif; ?>
</div>
<?php if (get_field('directions')) { ?>
<div class="widget inner-padding widget_block ride-directions">
<h3 class="sidebar-heading">Directions</h3>
<?php the_field('directions'); ?>
</div>
<?php } ?>
<div class="widget inner-padding widget_block popular-posts">
<h3 class="sidebar-heading">Popular Posts</h3>
<?php echo do_shortcode('[wpp limit="5" range="all" stats_views=1 order_by="views" thumbnail_width=120]') ?>
</div>
<?php
/*if ( ! dynamic_sidebar( 'sidebar-default' ) ) {
generate_do_default_sidebar_widgets( 'right-sidebar' );
}*/
/**
* generate_after_right_sidebar_content hook.
*
* @since 0.1
*/
do_action( 'generate_after_right_sidebar_content' );
?>
</div>
</div>