Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar Left')) : else : ?>
- <?php if (is_home() || is_category() || is_single()) { ?>
- <article class="moreinfo blog-categories singluar">
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Blog')) : ?> <?php endif; ?>
- </article><!--end of .moreinfo-->
- <article class="moreinfo singluar">
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Blog 2')) : ?> <?php endif; ?>
- </article><!--end of .moreinfo-->
- <article class="events singluar">
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1')) : ?> <?php endif; ?>
- </article><!--end of events-->
- <?php if ( $query->query_vars['eventDisplay'] == 'upcoming' || $query->query_vars['eventDisplay'] == 'past' || $query->query_vars['eventDisplay'] == 'month' && $query->query_vars['post_type'] == TribeEvents::POSTTYPE && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars['suppress_filters'] ) ) { ?>
- <!--Condition for Events Calendar-->
- <article class="moreinfo">
- <h6><a href="<?php echo get_permalink(10); ?>">Events & News</a></h6>
- <ul class="moreinfo">
- <li><a href="<?php echo home_url(); ?>/events">Events</a></li>
- <li><a href="<?php echo home_url(); ?>/blog">News</a></li>
- <li><a href="<?php echo get_permalink(204); ?>">Newsletters</a></li>
- </ul>
- </article><!--end of .moreinfo-->
- <article class="events">
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1')) : ?> <?php endif; ?>
- </article><!--end of events-->
- <?php } ?>
- <?php } elseif (is_page()) { ?>
- <article class="moreinfo">
- <h6>
- <a href="<?php echo get_permalink($post->post_parent) ?>">
- <?php
- $current = $post->ID;
- $parent = $post->post_parent;
- $grandparent_get = get_post($parent);
- $grandparent = $grandparent_get->post_parent;
- ?>
- <?php if ($root_parent = get_the_title($grandparent) !== $root_parent = get_the_title($current)) { echo get_the_title($grandparent); } else { echo get_the_title($parent); } ?>
- </a>
- </h6>
- <?php
- if($post->post_parent) {
- $children = wp_list_pages("sort_column=menu_order&link_before=<span>&link_after=</span>&title_li=&child_of=".$post->post_parent."&echo=0");
- $titlenamer = get_the_title($post->post_parent);
- }
- else {
- $children = wp_list_pages("sort_column=menu_order&link_before=<span>&link_after=</span>&title_li=&child_of=".$post->ID."&echo=0");
- $titlenamer = get_the_title($post->ID);
- }
- if ($children) { ?>
- <ul class="moreinfo">
- <?php echo $children; ?>
- </ul>
- <?php } ?>
- </article><!--end of moreinfo-->
- <article class="events">
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1')) : ?> <?php endif; ?>
- </article><!--end of events-->
- <?php } ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment