Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package Alizee
- */
- ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <?php
- function athemes_get_image_id($image_url) {
- global $wpdb;
- $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));
- return $attachment[0];
- }
- ?>
- <?php if (function_exists('cfs') && ($cfs->get('gallery_images') != '') ) : ?>
- <?php
- $gallery_images = $cfs->get('gallery_images');
- echo '<div class="home-gallery">';
- echo '<ul class="slides">';
- foreach ($gallery_images as $gallery_image) {
- $image_url = $gallery_image['gallery_image'];
- $imageid = athemes_get_image_id($image_url);
- $image_thumb = wp_get_attachment_image_src($imageid, 'alizee-slider');
- echo '<li><img src="' . $image_thumb[0] . '"></li>';
- }
- echo '</ul>';
- echo '</div>';
- ?>
- <?php endif; ?>
- <?php if (( get_theme_mod('home_layout') == 'one_col' ) && ( has_post_thumbnail() )) : //check if we have a thumbnail, if not add a class to the content ?>
- <div class="post-content">
- <?php else : ?>
- <div class="post-content no-thumb">
- <?php endif; ?>
- <header class="entry-header">
- <?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
- <?php if ( 'post' == get_post_type() ) : ?>
- <div class="entry-meta">
- <?php alizee_posted_on(); ?>
- </div><!-- .entry-meta -->
- <?php endif; ?>
- </header><!-- .entry-header -->
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div>
- </div>
- </article><!-- #post-## -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement