예제 #1
0
	</div>
<?php 
}
?>

<?php 
if ($pageVideos) {
    ?>
	<div id="section-video">
		<div class="container">
			<div class="block-w">
				<div class="head"><?php 
    _e('Videos', 'cish');
    ?>
<a href="<?php 
    _GetPagePermalinkBySlug($MAIN->getParentPageSlug() . '/videos');
    ?>
"><?php 
    _e('View All', 'cish');
    ?>
</a></div>
				<div class="row">
					<?php 
    while ($pageVideos->have_posts()) {
        $pageVideos->the_post();
        ?>
						<?php 
        $videosURLs = get_field('repeater_video');
        $count = 0;
        if ($videosURLs) {
            foreach ($videosURLs as $entry) {
예제 #2
0
function wpse_100012_override_yoast_breadcrumb_trail($links)
{
    global $post;
    global $wp_query;
    global $MAIN;
    $links[0]['text'] = __('Home', 'cish');
    $breadcrumb[] = $links[0];
    if (is_page('press')) {
        $subpage = get_query_var('subpage') ? get_query_var('subpage') : '';
        $breadcrumb[] = array('url' => _GetPagePermalinkBySlug('press', 1), 'text' => __('Press', 'cish'));
        if ($subpage == 'info') {
            $breadcrumb[] = array('text' => 'Info');
        } else {
            $taxonomy = get_term_by('slug', $wp_query->query_vars['subpage'], 'press-category');
            if ($taxonomy) {
                $breadcrumb[] = array('text' => $taxonomy->name);
            }
        }
        $links = $breadcrumb;
    } elseif (is_page('gallery')) {
        $albumID = get_query_var('album') ? get_query_var('album') : 0;
        if ($albumID > 0) {
            $albumID = $albumID - 1;
            $currentID = get_post($links[1]['id']);
            $galleryPage = get_page_by_path('gallery/gallery');
            $albums = get_field('albums', $galleryPage->ID);
            $albumName = '';
            if (isset($albums[$albumID])) {
                $albumName = $albums[$albumID]['album_title'];
            }
            $breadcrumb[] = array('url' => get_permalink($currentID->ID), 'text' => $currentID->post_title);
            $breadcrumb[] = array('url' => _GetPagePermalinkBySlug('gallery/gallery', 1), 'text' => __('Albums', 'cish'));
            $breadcrumb[] = array('text' => $albumName);
            $links = $breadcrumb;
        }
    } elseif (is_singular('event')) {
        $program = get_field('program', $post->ID);
        if ($program) {
            $currentID = get_post($links[1]['id']);
            $breadcrumb[] = array('url' => get_permalink($program->ID), 'text' => $program->post_title);
            $breadcrumb[] = array('url' => get_permalink($currentID->ID), 'text' => $currentID->post_title);
            if (isset($wp_query->query_vars['subpage'])) {
                $breadcrumb[] = array('text' => ucwords(str_replace('-', ' ', $MAIN->translateManual($wp_query->query_vars['subpage']))));
            }
            $links = $breadcrumb;
            //array_splice( $links, 1, -2, $breadcrumb );
        }
    } elseif (is_singular('program')) {
        $currentID = get_post($links[1]['id']);
        $breadcrumb[] = array('url' => get_permalink($currentID->ID), 'text' => $currentID->post_title);
        if (isset($wp_query->query_vars['subpage'])) {
            $breadcrumb[] = array('text' => ucwords(str_replace('-', ' ', $MAIN->translateManual($wp_query->query_vars['subpage']))));
        }
        $links = $breadcrumb;
        //array_splice( $links, 1, -2, $breadcrumb );
    } elseif (is_singular('profile')) {
        $currentID = get_post($links[1]['id']);
        $breadcrumb[] = array('url' => _GetPagePermalinkBySlug('center', 1), 'text' => __('Center', 'cish'));
        $memberType = get_field('member_type', $currentID);
        $memberTypeTitle = ucwords(str_replace('-', ' ', $memberType));
        $breadcrumb[] = array('url' => _GetPagePermalinkBySlug('center/' . $memberType, 1), 'text' => $memberTypeTitle);
        $breadcrumb[] = array('url' => get_permalink($currentID->ID), 'text' => $currentID->post_title);
        $links = $breadcrumb;
    } elseif (is_singular('press-info')) {
        $currentID = get_post($links[1]['id']);
        $breadcrumb[] = array('url' => _GetPagePermalinkBySlug('press', 1), 'text' => __('Press', 'cish'));
        $breadcrumb[] = array('url' => get_permalink($currentID->ID), 'text' => $currentID->post_title);
        $links = $breadcrumb;
    } elseif (is_singular('publication')) {
        $currentID = get_post($links[1]['id']);
        $breadcrumb[] = array('url' => _GetPagePermalinkBySlug('publications', 1), 'text' => __('Publications', 'cish'));
        $breadcrumb[] = array('url' => get_permalink($currentID->ID), 'text' => $currentID->post_title);
        $links = $breadcrumb;
    }
    return $links;
}