Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

finished sermons sidebar

  • Loading branch information...
commit 5ada17eca8b9544919237ba7fd9543f065170e29 1 parent de0d97a
Justin Louie authored
View
3  themes/scacseattle.org/sass/colors.css.sass
@@ -1,7 +1,8 @@
-
$text-color: #444
$text-grey: #777
+$active-link-color: #77991F
+
$light-grey: #ECEDED
$medium-grey: #CCCCCC
$search-box-bg: #EFEFEF
View
26 themes/scacseattle.org/sass/sidebars.css.sass
@@ -16,16 +16,22 @@
font-size: 11px
position: relative
color: $text-color
+
+ .sidebar-sub-page-listing
+ margin: 0.5em 0 0 16px
+ padding: 0px
+ list-style: none
.current_page_item
- a
- color: #77991F
+ > a
+ color: $active-link-color
font-weight: bold
- .active-box
- height: 1em
- width: 1em
- background: #77991F
- display: block
- position: absolute
- left: -1.5em
- top: 2px
+
+ .active-box
+ height: 1em
+ width: 1em
+ background: #77991F
+ display: block
+ position: absolute
+ left: -1.5em
+ top: 2px
View
29 themes/scacseattle.org/sidebar-sermons.php
@@ -4,29 +4,44 @@
<h3 class="sidebar-title">Sermon Series</h3>
<ul class="sidebar-page-listing">
<?php
- global $wp_query;
+ global $wp_query, $post;
+
+ if(is_single($post)){
+ $post_id_to_check = $post->ID;
+ }else{
+ $post_id_to_check = -1; //seems like somewhat of a hack
+ }
$global_term = $wp_query->get_queried_object();
+
$taxonomy = 'sermon_series';
$terms = get_terms($taxonomy);
foreach ($terms as $term) {
- $current_series = get_the_term_list('', 'sermon_series');
?>
<li class="page_item <?php echo ($global_term->slug == $term->slug ? "current_page_item" : ""); ?>">
<a href="<?php echo get_term_link($term); ?>"><span class="active-box"></span><?php echo $term->name; ?></a>
<?php
- if(false && $global_term->slug == $term->slug) :
+ if($global_term->slug == $term->slug || has_term($term->slug, $taxonomy, $post_id_to_check)) :
?>
- <ul class="sidebar-page-listing">
+ <ul class="sidebar-sub-page-listing">
<?php
$args = array(
'post_type' => 'ct_sermon',
- 'ct_sermon' => $term->slug
-
+ 'tax_query' => array(
+ array(
+ 'taxonomy' => 'sermon_series', //different from post_type, obvious i know... sigh.
+ 'terms' => $term->slug,
+ 'field' => 'slug' //What column from the db you're using
+ )
+ ),
);
$posts = get_posts($args);
- var_dump($posts);
+ foreach($posts as $p) :
?>
+ <li class="page_item <?php echo ($p->ID == $post->ID ? "current_page_item" : ""); ?>">
+ <a href="<?php echo get_permalink($p); ?>"><span class="active-box"></span><?php echo get_the_title($p); ?></a>
+ </li>
+ <?php endforeach; ?>
</ul>
<?php
endif;
View
22 themes/scacseattle.org/style.css
@@ -269,17 +269,21 @@
font-size: 11px;
position: relative;
color: #444444; }
- .sidebar .sidebar-page-listing .current_page_item a {
+ .sidebar .sidebar-page-listing .sidebar-sub-page-listing {
+ margin: 0.5em 0 0 16px;
+ padding: 0px;
+ list-style: none; }
+ .sidebar .sidebar-page-listing .current_page_item > a {
color: #77991f;
font-weight: bold; }
- .sidebar .sidebar-page-listing .current_page_item .active-box {
- height: 1em;
- width: 1em;
- background: #77991f;
- display: block;
- position: absolute;
- left: -1.5em;
- top: 2px; }
+ .sidebar .sidebar-page-listing .current_page_item > a .active-box {
+ height: 1em;
+ width: 1em;
+ background: #77991f;
+ display: block;
+ position: absolute;
+ left: -1.5em;
+ top: 2px; }
body {
font-family: "Open Sans", sans-serif, Arial;
Please sign in to comment.
Something went wrong with that request. Please try again.