Example #1
0
	</div><!-- .page-content -->

	<div class="entry-content">

	<?php 
if (current_user_can('see_education_resource')) {
    ?>

		<div class="alert alert-info">
			<p><?php 
    pll_e('Jūs esate prisijungę');
    ?>
.</p>
			<ul>
				<?php 
    $pageID = kcsite_getPageByTempate('education_list.php', 'ID');
    ?>
				<li><a href="<?php 
    echo get_permalink($pageID);
    ?>
"><?php 
    pll_e('Eiti į mokymo resursų puslapį');
    ?>
</a></li>
				<li><a href="<?php 
    echo wp_logout_url(add_query_arg('do', 'logout', get_permalink()));
    ?>
"><?php 
    pll_e('Atsijungti');
    ?>
</a></li>
Example #2
0
function simple_breadcrumb()
{
    global $post;
    global $staticVars;
    // print_r(has_term($staticVars['industryNewTypeID'], 'new-type', $post));exit;
    $sep = ' / ';
    echo '<a href="' . pll_home_url() . '">' . pll__('Lietuvos kino centras') . '</a>' . $sep;
    //echo '<a href="'.pll_home_url().'">'.get_bloginfo('name').'</a>'.$sep;
    /*	if ( is_category() || is_single() ) {
    		the_category(', ');
    		if ( is_single() ) {
    			echo $sep;
    			the_title();
    		}*/
    if (is_single()) {
        if (get_post_type() == 'post') {
            if (has_term($staticVars['industryNewTypeID'], 'new-type', $post)) {
                $news_link = $staticVars['industryNewsUrl'];
                $news_link_text = pll__('Industrijos naujienos');
            } else {
                $news_link = $staticVars['newsUrl'];
                $news_link_text = pll__('Naujienos');
            }
            echo '<a href="' . $news_link . '">';
            echo $news_link_text;
            echo "</a>";
        } elseif (get_post_type() == 'interesting-fact') {
            $pages = get_pages(array('meta_key' => '_wp_page_template', 'meta_value' => 'page-templates/interesting_facts.php', 'lang' => pll_current_language('slug')));
            //print_r($pages);
            echo '<a href="' . get_permalink($pages[0]->ID) . '">';
            pll_e('Įdomūs faktai');
            echo "</a>";
        } elseif (get_post_type() == 'tribe_events') {
            $url = $staticVars['eventsUrl'];
            echo '<a href="' . $url . '">' . pll__('Renginiai') . '</a>';
        } elseif (get_post_type() == 'education-resource') {
            $url = $staticVars['educationResourceUrl'];
            $title = get_the_title(kcsite_getPageByTempate('education_list.php'));
            echo '<a href="' . $url . '">' . $title . '</a>';
        } elseif (get_post_type() == 'film') {
            $url = get_permalink($staticVars['filmRegisterSearchPageId']);
            $title = get_the_title($staticVars['filmRegisterSearchPageId']);
            echo '<a href="' . $url . '">' . $title . '</a>';
        } elseif (get_post_type() == 'lithfilm') {
            $url = get_permalink($staticVars['lithuanianFilmsSearchPageId']);
            $title = get_the_title($staticVars['lithuanianFilmsSearchPageId']);
            echo '<a href="' . $url . '">' . $title . '</a>';
        }
        echo $sep;
        the_title();
    } elseif (!is_single() && get_post_type() == 'tribe_events') {
        //event calendar view
        pll_e('Renginiai');
    } elseif (is_page() && $post->post_parent) {
        //checkiing home page is not needed, but dos make no difference, so left
        $home = get_page_by_title('home');
        //show all ancestors (parent pages)
        for ($i = count($post->ancestors) - 1; $i >= 0; $i--) {
            if ($home->ID != $post->ancestors[$i]) {
                echo '<a href="';
                echo get_permalink($post->ancestors[$i]);
                echo '">';
                echo get_the_title($post->ancestors[$i]);
                echo "</a>" . $sep;
            }
        }
        echo the_title();
    } elseif (is_page()) {
        echo the_title();
    } elseif (is_404()) {
        echo of_get_option_by_lang('kcsite_404_page_title');
    }
}