</div>
      </a>
    </div>
  </section>
  <?php 
}
?>

  <!-- home slideshow -->
  <section id="home-slideshow" class="border-bottom">
    <div class="container">
      <div class="row">
        <div class="col s-col1 force-col"></div>
        <div class="col s-col22 border-left border-right">
          <?php 
$home_slideshow = IGV_get_option('_igv_home_slideshow');
if ($home_slideshow) {
    echo do_shortcode($home_slideshow);
}
?>
        </div>
      </div>
    </div>
  </section>

<!-- end main-content -->

</main>

<?php 
get_footer();
Beispiel #2
0
<section id="scripts">
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  <script>window.jQuery || document.write('<script src="<?php 
bloginfo('stylesheet_directory');
?>
/js/vendor/jquery-2.1.1.min.js"><\/script>')</script>
<?php 
wp_footer();
$google_analytics = IGV_get_option('_igv_google_analytics');
if (!empty($google_analytics)) {
    echo $google_analytics;
}
?>
</section>
<?php

// popular posts query
$args = array('posts_per_page' => '5', 'post__not_in' => array($post->ID), 'meta_key' => 'ghb_hype', 'orderby' => 'meta_value_num', 'date_query' => array('after' => date('Ymd', strtotime('-' . IGV_get_option('_igv_popular_expiry') . ' weeks'))));
$query = new WP_Query($args);
if ($query->have_posts()) {
    ?>

  <div id="single-popular" class="u-cf single-sidebar-item">
    <div class="col s1 feed-category">
      <span class="rotate-text font-condensed">
        Populares
      </span>
    </div>

    <div class="col s7">

<?php 
    while ($query->have_posts()) {
        $query->the_post();
        ?>
      <article <?php 
        post_class('small-post theme-border-color u-cf');
        ?>
 id="post-<?php 
        the_ID();
        ?>
">

        <a href="<?php 
        the_permalink();
function embed_apple_shortcode($atts)
{
    $a = shortcode_atts(array('id' => false, 'ad' => false), $atts);
    if (!$a['id']) {
        return '';
    }
    if ($a['ad']) {
        $ad = '<div class="embed-ad">' . IGV_get_option('_igv_ads_embed_' . $a['ad']) . '</div>';
        $html = '<div class="custom-embed-with-ad u-cf"><div class="embed"><iframe src="https://embed.itunes.apple.com/us/embedded-player/' . $a['id'] . '" width="560" height="104" frameborder="0" scrolling="no"></iframe></div>' . $ad . '</div>';
    } else {
        $html = '<div class="custom-embed u-cf"><div class="embed"><iframe src="https://embed.itunes.apple.com/us/embedded-player/' . $a['id'] . '" width="560" height="104" frameborder="0" scrolling="no"></iframe></div></div>';
    }
    return $html;
}
<?php

// Get theme color
$theme_color = IGV_get_option('_igv_theme_color');
$theme_mid_color = hex2rgba($theme_color, '0.3');
$theme_pattern = IGV_get_option('_igv_theme_pattern');
$soft_white = 'rgb(253, 253, 253)';
?>
<style>
.theme-bg {
  background-color: <?php 
echo $theme_color;
?>
;
}

.theme-grad-bg {
  background: rgb(253, 253, 253);
  background: -moz-linear-gradient(top, <?php 
echo $soft_white;
?>
 0%, <?php 
echo $theme_color;
?>
 100%);
  background: -webkit-linear-gradient(top, <?php 
echo $soft_white;
?>
 0%,<?php 
echo $theme_color;
?>
function get_twitter_feed($twitter_handle)
{
    if (empty($twitter_handle)) {
        return new WP_ERROR('no-twitter-handle', 'Missing twitter handle');
    }
    $feed = get_transient('twitter_feed_' . $twitter_handle);
    // If feed is not cached
    if (empty($feed)) {
        // Require TwitterOAuth lib
        if (!class_exists('TwitterOAuth')) {
            require "lib/twitteroauth/autoload.php";
        }
        // Get keys
        $twitter_key = IGV_get_option('_igv_twitter_key');
        $twitter_secret = IGV_get_option('_igv_twitter_secret');
        // Connect to twitter
        $twitter = new TwitterOAuth($twitter_key, $twitter_secret);
        // Get Timeline
        $feed = $twitter->get('statuses/user_timeline', array('count' => 10, 'screen_name' => $twitter_handle, 'trim_user' => 'true', 'exclude_replies' => 'true', 'contributor_details' => 'false', 'include_rts' => 'false'));
        if (isset($feed->errors)) {
            return false;
        }
        // Regex for URLs
        $url_regex = "@(https?://([-\\w\\.]+[-\\w])+(:\\d+)?(/([\\w/_\\.#-]*(\\?\\S+)?[^\\.\\s])?)?)@";
        foreach ($feed as &$twit) {
            // Remove URLs from the text
            $twit->text = preg_replace($url_regex, '', $twit->text);
            $urls = $twit->entities->urls;
            $link = new StdClass();
            // If the twit links to a post inside the site, link that twit to that post
            // else link it to twitter and set "blank" as TRUE
            // we don't care about link to other sites inside the twit
            if (strpos($urls[0]->display_url, '8106.tv') !== FALSE) {
                $link->url = $urls[0]->expanded_url;
                $link->blank = FALSE;
            } else {
                $link->url = 'https://twitter.com/statuses/' . $twit->id;
                $link->blank = TRUE;
            }
            $twit->link = $link;
        }
        // Set timeline as transient with expiration time of 5 min
        set_transient('twitter_feed_' . $twitter_handle, $feed, 5 * 'MINUTE_IN_SECONDS');
    }
    /*   delete_transient( 'twitter_feed_' . $twitter_handle); */
    return $feed;
}
Beispiel #7
0
            ?>

      <div class="ad u-float">
        <div class="col s1"></div>
        <div class="feed-post-container col s7">
      <?php 
            if ($item_count == 4) {
                echo IGV_get_option('_igv_ads_grid_1');
            } else {
                if ($item_count == 12) {
                    echo IGV_get_option('_igv_ads_grid_2');
                } else {
                    if ($item_count == 16) {
                        echo IGV_get_option('_igv_ads_grid_3');
                    } else {
                        echo IGV_get_option('_igv_ads_grid_4');
                    }
                }
            }
            ?>
        </div>
      </div>

    <?php 
            // End AD
        } else {
            ?>

      <?php 
            // POST
            the_post();
Beispiel #8
0
  <section id="main-container">

  <div id="header-advert-space" class="theme-bg theme-pattern-bg">
    <div class="container">
      <div class="row u-align-center">
      <?php 
// Leaderboard Ad
echo IGV_get_option('_igv_ads_top_leaderboard');
?>
      </div>
    </div>
  </div>

<?php 
// Get radio embed code
$radio_embed = IGV_get_option('_igv_radio_embed');
if ($radio_embed) {
    ?>
  <div id="drawer-radio" class="header-drawer theme-grad-bg u-fc">
    <div class="container">
      <div class="row">
        <div class="col s24">
<?php 
    echo $radio_embed;
    ?>
        </div>
      </div>
    </div>
  </div>
<?php 
}
Beispiel #9
0
<?php

$address = IGV_get_option('_igv_address');
$hours = IGV_get_option('_igv_hours');
$email = IGV_get_option('_igv_email');
$facebook = IGV_get_option('_igv_facebook');
$twitter = IGV_get_option('_igv_twitter');
$instagram = IGV_get_option('_igv_instagram');
$address_replaced = preg_replace("/[\\s]/", "+", $address);
$maps_url = 'https://www.google.com.mx/maps/place/' . $address_replaced;
?>
    <footer id="footer" class="container">
      <div class="row">
        <div class="col into-3">
          <?php 
if (!empty($address)) {
    echo '<a class="address" href="' . $maps_url . '" target="_blank">' . $address . '</a>';
}
?>
          <?php 
if (!empty($hours)) {
    echo wpautop($hours);
}
?>
        </div>
        <div class="col into-3">
          <?php 
if (!empty($email)) {
    echo '<span class="contact-email"><a href="mailto:' . $email . '">' . $email . '</a></span>';
}
?>
Beispiel #10
0
<nav class="main-menu u-bold-cn">
  <ul>
<?php 
$shop_url = IGV_get_option('_igv_shop_url');
if (!empty($shop_url)) {
    ?>
    <li class="menu-item js-svg-container">
      <a href="<?php 
    echo $shop_url;
    ?>
" class="menu-item-shop blinky">Shop</a>
      <?php 
    echo url_get_contents(get_bloginfo('stylesheet_directory') . '/img/smile.svg');
    ?>
    </li>
<?php 
}
?>
    <li class="menu-item js-svg-container">
      <a href="<?php 
echo get_bloginfo('url') . '/archive/';
?>
" class="menu-item-archive">Archive</a>
      <?php 
echo url_get_contents(get_bloginfo('stylesheet_directory') . '/img/squiggle.svg');
?>
    </li>
    <li class="menu-item js-svg-container">
      <form action="/" method="get" class="u-bold-cn">
        <div class="expand">
          <input type="text" name="s" class="u-bold-cn expand" id="search" placeholder="SEARCH" svalue="<?php 
<ul class="social-widgets u-inline-list">
  <li class="facebook-widget"><div class="fb-like" data-layout="button" data-action="like" data-show-faces="false" data-share="true"></div></li>
  <li class="twitter-widget"><a class="twitter-share-button" data-via="<?php 
echo IGV_get_option('_igv_twitter_handle');
?>
"></a></li>
</ul>
Beispiel #12
0
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  <script>window.jQuery || document.write('<script src="<?php 
bloginfo('stylesheet_directory');
?>
/js/vendor/jquery-2.1.1.min.js"><\/script>')</script>
  <?php 
wp_footer();
?>

  <div id="fb-root"></div>
  <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.5&appId=<?php 
echo IGV_get_option('_igv_facebook_app_id');
?>
";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>

  <script>window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s);
  js.id = id;
  js.src = "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);

  t._e = [];
Beispiel #13
0
<?php

// Get twitter feed
$twitter_feed = get_twitter_feed(IGV_get_option('_igv_twitter_handle'));
if ($twitter_feed) {
    ?>

<section id="twitter-feed" class="theme-bg hide-on-mobile">

  <div id="twitter-marquee-outer">
    <div id="twitter-marquee-holder">
      <div class="twitter-marquee">

  <?php 
    foreach ($twitter_feed as $twitter_item) {
        $url = $twitter_item->link->url;
        $target = $twitter_item->link->blank === TRUE ? '_blank' : '_self';
        // NOTE: we can also check $blank to add the ajax-link class
        $text = $twitter_item->text;
        ?>

    <a class="twitter-feed-tweet" href="<?php 
        echo $url;
        ?>
" target="<?php 
        echo $target;
        ?>
"><?php 
        echo $text;
        ?>
</a>
Beispiel #14
0
?>
</a><?php 
if (is_page() && !is_front_page()) {
    echo '<span id="header-page-title">, ' . get_the_title() . '</span>';
}
?>
        </div>
<!--
        <div id="header-language-toggle-holder" class="col col-2 font-mono">
          <?php 
echo qtranxf_generateLanguageSelectCode('both');
?>
        </div>
-->
      </div>
<!--
      <div id="subheader" class="row">
        <div class="col col-12">
          <?php 
$textEs = IGV_get_option('_igv_header_text_es');
$textEn = IGV_get_option('_igv_header_text_en');
if (!empty($textEs) && !empty($textEn)) {
    echo __('[:es]' . $textEs . '[:en]' . $textEn);
}
?>
        </div>
      </div>
-->
    </div>
  </header>
Beispiel #15
0
<?php

// Get instagram feed
$instagram_feed = get_instagram_feed(IGV_get_option('_igv_instagram_handle'));
if ($instagram_feed) {
    ?>

<section id="instagram-feed" class="theme-grad-bg hide-on-mobile">
  <div class="container">
    <div class="row">

  <?php 
    foreach ($instagram_feed as $index => $instagram_item) {
        $likes = $instagram_item->likes->count;
        $comments = $instagram_item->comments->count;
        $img = $instagram_item->images->low_resolution->url;
        $hi_res_img = $instagram_item->images->standard_resolution->url;
        $caption = $instagram_item->caption->text;
        ?>

  <?php 
        if ($index != 0) {
            ?>
      <div class="col s1">&#8200;</div>
  <?php 
        }
        ?>

      <div class="instagram-item col s4">
        <a href="<?php 
        echo $instagram_item->link;
Beispiel #16
0
        <div class="row">
          <div class="col s16">
            <div class="copy">
              <?php 
        the_content();
        ?>
            </div>
          </div>
          <div class="col s8">
            <div class="ad-margin">
          <?php 
        echo IGV_get_option('_igv_ads_single_1');
        ?>
            </div>
          <?php 
        echo IGV_get_option('_igv_ads_single_2');
        ?>
          </div>
        </div>
      </div>

    </article>

<?php 
    }
} else {
    ?>
    <article class="u-alert col s16"><?php 
    _e('Sorry, no posts matched your criteria :{');
    ?>
</article>
Beispiel #17
0
</section>

<?php 
get_template_part('partials/menu');
?>

<!-- main content -->

<main id="main-content">

  <div id="us">
    <div class="u-holder u-align-center center-spaced">
      <div class="u-held">
        <div id="us-copy" class="center-text u-align-left">
          <?php 
$about = IGV_get_option('_igv_about');
if (!empty($about)) {
    echo wpautop($about);
}
?>
        </div>
      </div>
    </div>
  </div>

  <!-- main posts loop -->
  <section id="work">
<?php 
$projects = get_posts('post_type=project&posts_per_page=-1');
if ($projects) {
    foreach ($projects as $post) {