コード例 #1
0
$theme_display_menu_items = get_option('theme_display_menu_items');
if ($theme_display_menu_items == 'true') {
    echo '<hr class="separator">';
    echo '<section class="flexcarousel"><div class="carousel es-carousel-wrapper clearfix"><div class="es-carousel"><ul>';
    $menu_query = new WP_Query(array('post_type' => 'menu-item', 'posts_per_page' => -1, 'meta_query' => array(array('key' => 'featured', 'value' => 'Yes', 'compare' => '='))));
    if ($menu_query->have_posts()) {
        while ($menu_query->have_posts()) {
            $menu_query->the_post();
            $temp_id = get_the_ID();
            $price = get_post_meta($temp_id, 'menu_price', true);
            if (has_post_thumbnail($temp_id)) {
                echo '<li><figure class="the-tooltip top center full-width sienna">';
                echo '<a href="' . get_permalink($temp_id) . '">';
                echo get_the_post_thumbnail($temp_id, 'square-menu-thumbnail');
                echo '</a>';
                echo '<figcaption>' . get_custom_title($temp_id) . '</figcaption>';
                echo '</figure><div class="price"><span>';
                echo $price;
                echo '</span></div></li>';
            }
        }
    }
    echo '</ul></div></div></section>';
}
/*  Testimonial */
$theme_testimonial_text = stripslashes(get_option('theme_testimonial_text'));
$theme_testimonial_author = stripslashes(get_option('theme_testimonial_author'));
if (!empty($theme_testimonial_text)) {
    echo '<hr class="separator">';
    echo '<blockquote><p>' . $theme_testimonial_text . '</p><p class="author">' . $theme_testimonial_author . '</p></blockquote>';
}
コード例 #2
0
ファイル: header.php プロジェクト: peppicelli/pictorico
?>
"><i class="fa fa-envelope-o fa-1x"></i></a>
            </div>
            <div class="languages">
            <?php 
global $polylang;
foreach ($polylang->get_languages_list() as $language) {
    $url = esc_url($polylang->get_translation_url($language));
    $language = esc_js($language->slug);
    $active = pll_current_language('slug') == $language ? 'class="active"' : '';
    echo '<a href="' . $url . '" ' . $active . '>' . $language . '</a>';
}
?>
            </div>
		</div>
	</header><!-- #masthead -->
	<?php 
if (function_exists('get_custom_title')) {
    pictorio_get_header_with_title(get_custom_title());
} else {
    pictorio_get_header_with_title();
}
?>
	<div class="overlay overlay-hugeinc">
		<h1 id="overlay-title">Title</h1>
		<span class="fa fa-times fa-2x overlay-close"></span>
		<div class="overlay-container"></div>
		<h2 id="overlay-link" class="overlay-link"></h2>
	</div>
	<div id="content" class="site-content">