示例#1
0
function get_webisode_json($webisodes, $has_pager)
{
    foreach ($webisodes as $webisode) {
        $webisode->thumbnail_image = get_artist_image('thumbnail_image', $webisode->ID);
        $webisode->episode = get_post_meta($webisode->ID, 'episode', true);
    }
    $posts['webisodes'] = $webisodes;
    if ($has_pager) {
        $posts['pager']['previous'] = get_previous_webisode($webisode->episode);
        $posts['pager']['next'] = get_next_webisode($webisode->episode);
        $posts['pager']['last_page'] = get_last_page();
    }
    return json_encode($posts);
}
if ($webisodes->have_posts()) {
    ?>
            <?php 
    while ($webisodes->have_posts()) {
        ?>
              <?php 
        $webisodes->the_post();
        ?>
              <div class="small-6 medium-4 large-3 column end">
                <a href="<?php 
        echo get_permalink();
        ?>
" class="webisode">
                  <figure>
                    <img src="<?php 
        echo get_artist_image('thumbnail_image', $webisodes->post->ID);
        ?>
" />
                  </figure>
                  <h3 class="webisode-title"><?php 
        echo get_the_title();
        ?>
</h3>
                </a>
              </div>
            <?php 
    }
    ?>
          <?php 
}
?>
示例#3
0
                          </div>
                      </div>
                  </div>
              </div>
              <div class="small-offset-2 small-8 end large-offset-2 large-2 column">
                  <div class="album">
                    <a href="<?php 
echo get_post_meta($post_id, 'album_link', true);
?>
" target="_blank" class="album-link">
                      <h3 class="album-title"><?php 
echo get_post_meta($post_id, 'album_title', true);
?>
</h3>
                      <img src="<?php 
echo get_artist_image('album_thumbnail', $post_id);
?>
" alt="" class="album-image" />
                    </a>
                    <a class="site" href="<?php 
echo get_post_meta($post_id, 'site', true);
?>
" target="_blank"><?php 
echo get_post_meta($post_id, 'site', true);
?>
</a>
                  </div>
              </div>
          </div>
      </div>
    </section>
        <?php 
wp_reset_postdata();
$post_id = is_home() ? get_site_option('featured_webseries') : $post->ID;
?>
        <style type="text/css">
          #background { 
            background-image:url('/wp-content/themes/webseries/images/assets/main-gradient.png'),
              url('<?php 
echo get_artist_image("main_image", $post_id);
?>
');
          }
        </style>