Exemplo n.º 1
0
 function widget($args, $instance)
 {
     extract($args);
     /* Our variables from the widget settings. */
     //$title = apply_filters('widget_title', $instance['title'] );
     $ad = $instance['ad'];
     $link = $instance['link'];
     /* Before widget (defined by themes). */
     echo $before_widget;
     $contactID = ot_get_page("contact");
     /* Display the widget title if one was input (before and after defined by themes). */
     //echo $before_title.$title.$after_title;
     echo '<div class="banner">';
     /* Display Ad */
     if ($link) {
         echo '<a href="' . $link . '" target="_blank"><img src="' . $ad . '" alt="Banner"/></a>';
     } elseif ($ad) {
         echo '<img src="' . $ad . '" alt="Banner"/>';
     }
     echo '</div>';
     /* After widget (defined by themes). */
     echo $after_widget;
 }
Exemplo n.º 2
0
<?php

if (is_pagetemplate_active("template-contact.php") || is_pagetemplate_active("template-contact-2.php")) {
    $contactPages = ot_get_page("contact");
    if ($contactPages[0]) {
        $contactUrl = get_page_link($contactPages[0]);
    } else {
        $contactPages = get_contact_page2();
        $contactUrl = get_page_link($contactPages[0]);
    }
} else {
    $contactUrl = "#";
}
?>
<div class="the-error-msg">
	<strong class="font-replace"><?php 
_e("No Articles Found", THEME_NAME);
?>
</strong>
	<p><?php 
printf(__('Sorry, there are no articles here ! <br/>You can <a href="%1$s">contact us</a> to resolve this problem !', THEME_NAME), $contactUrl);
?>
</p>
	<p><?php 
printf(__('Or You can still <a href="%1$s">go back to Homepage</a> !', THEME_NAME), home_url());
?>
</p>
</div>
Exemplo n.º 3
0
                    <?php 
if ($i % 3 == 0) {
    ?>
                        <div class="main-spacer"></div>
                    <?php 
}
?>
                </div>
            </div>

            <div class="main-spacer"></div>
            <?php 
if ($type == "1") {
    ?>
                <p class="show-all"><a href="<?php 
    echo get_page_link(ot_get_page("menu-card", false));
    ?>
"><span><?php 
    _e("Show entire menu card", THEME_NAME);
    ?>
</span></a></p>
            <?php 
}
?>
            <p class="back-top"><a href="#top"><span><?php 
_e("go back to the top", THEME_NAME);
?>
</span></a></p>

        </div>
    </div>
Exemplo n.º 4
0
if ($imageType == "small") {
    $imageType = "small_large";
} else {
    $imageType = "large_small";
}
$shopID = get_shop_page();
$contactID = ot_get_page("contact");
$galleryID = ot_get_page('gallery');
$homeID = ot_get_page('homepage');
$locationID = ot_get_page('location');
$menuID = ot_get_page('menu-card');
$menuShopID = ot_get_page('menu-card-shop');
$aboutID = ot_get_page('about');
$rsvpID = ot_get_page('rsvp');
$fullID = ot_get_page('full-width');
$reservationID = ot_get_page('reservations');
$archiveID = get_archive_page();
$eventsID = get_events_page();
$menuID = get_menu_page();
$mapID = get_map_page();
$shareAll = get_option(THEME_NAME . "_share_all");
if (isset($_GET['post'])) {
    $currentID = $_GET['post'];
} else {
    $currentID = 0;
}
global $box_array;
$box_array = array();
$box_array[] = array('id' => 'image-size', 'title' => '' . $image . ' Image Size', 'page' => 'post', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => 'Size:', 'std' => '', 'id' => $prefix . 'image_size', 'type' => $imageType)), 'size' => 10, 'first' => 'yes');
//about couple
if (!in_array($currentID, $reservationID) && !in_array($currentID, $homeID) && !in_array($currentID, $contactID) && !in_array($currentID, $menuID) && !in_array($currentID, $menuShopID)) {
Exemplo n.º 5
0
					

<?php 
if ($titleShow != "no") {
    ?>
 
	<div class="main-head">
		<?php 
    if (is_single() && $post_type == OT_POST_MENU) {
        ?>
			<?php 
        $menuID = ot_get_page("menu-card");
        $title = get_the_title($menuID[0]);
        ?>
			<a href="<?php 
        echo get_page_link(ot_get_page('menu-card', false));
        ?>
" class="right"><?php 
        _e("back to Menu Card", THEME_NAME);
        ?>
</a>
		<?php 
    } else {
        ?>
			<?php 
        $blogID = get_option('page_for_posts');
        $title = get_the_title($blogID[0]);
        ?>
			<a href="<?php 
        echo home_url();
        ?>
Exemplo n.º 6
0
function ot_page_title()
{
    $post_type = get_post_type();
    if (!is_archive() && !is_category() && !is_search() && $post_type != OT_POST_GALLERY) {
        $title = get_the_title(OT_page_id());
    } else {
        if (is_single() && $post_type == OT_POST_GALLERY) {
            $galID = ot_get_page("gallery");
            $title = get_the_title($galID[0]);
        } else {
            if (is_search()) {
                $title = __("Search Results for", THEME_NAME) . " \"" . remove_html($_GET['s']) . "\"";
            } else {
                if (is_category()) {
                    $category = get_category(get_query_var('cat'));
                    $cat_id = $category->cat_ID;
                    $catName = get_category($cat_id)->name;
                    $title = $catName;
                } else {
                    if (is_author()) {
                        $curauth = get_query_var('author_name') ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
                        $title = __("Posts From", THEME_NAME) . " " . $curauth->display_name;
                    } else {
                        if (is_tag()) {
                            $category = single_tag_title('', false);
                            $title = __("Tag", THEME_NAME) . " \"" . $category . "\"";
                        } else {
                            if (is_archive()) {
                                if (ot_is_woocommerce_activated() == true && woocommerce_get_page_id('shop') == OT_page_id()) {
                                    $title = get_the_title(OT_page_id());
                                } else {
                                    $title = __("Archive", THEME_NAME);
                                }
                            } else {
                                $title = get_the_title(OT_page_id());
                            }
                        }
                    }
                }
            }
        }
    }
    echo $title;
}
Exemplo n.º 7
0
		<div class="main-title">
			<h1><?php 
    echo ot_page_title();
    ?>
</h1>
			<div class="ribbon"><div class="inner"></div></div>
			<div class="ribbon-tail"><div class="inner-top"></div><div class="inner-bottom"></div></div>
		</div>
	</div>
<?php 
}
if ($titleShow != "no" && is_page_template("template-menu-card.php") || is_page_template("template-menu-card-shop.php")) {
    ?>
	<div class="main-head menu-card-title">
		<a href="<?php 
    echo get_page_link(ot_get_page("reservations", false));
    ?>
" class="right"><?php 
    _e("check &amp; order your Reservation", THEME_NAME);
    ?>
</a>
		<div class="main-title">
			<h1><?php 
    echo ot_page_title();
    ?>
</h1>
			<div class="ribbon-tail"><div class="inner-top"></div><div class="inner-bottom"></div></div>
			<div class="ribbon-tail left"><div class="inner-top"></div><div class="inner-bottom"></div></div>
		</div>
	</div>
<?php