Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <body>
- <nav><?php wp_nav_menu( array( 'theme_location' => 'top-menu', 'menu_class' => 'top_menu', 'menu_id' => 'top_menu' ) ); ?>
- <div id="left">
- <form action="" method="get" role="search">
- <input type="search" type="text" name="s" id="s" placeholder="חיפוש"/><i id="settings" class="fa fa-cog"></i>
- </form>
- </div>
- </nav>
- <div id="settings-m"><a href="#">מחובר בתור<span> yotamN</span></a><a href="#">הצג פרופיל</a><a href="#">העלה סיקור</a><a href="#">התנתק</a></div>
- <div id="main">
- <header>
- <?php $count = 0; ?>
- <?php
- $homeArgs = array(
- 'posts_per_page' => 4
- );
- $homeQuery = new WP_Query( $homeArgs );
- while ( $homeQuery->have_posts() ) : $homeQuery->the_post();
- ?>
- <?php
- if ($count < 3){
- // LOOP STRUCTURE FOR OUR LATEST POST
- ?>
- <a href="<?php the_permalink(); ?>">
- <div>
- <div class="top"><?php the_title(); ?></div>
- <div class="middle">
- <?php
- $thumbUrl = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
- if($thumbUrl) {
- echo '<img src="'.$thumbUrl.'" alt="'.get_the_title().'" />';
- }
- else {
- echo '<img src="'.get_bloginfo('template_url').'/images/nopost-image-home.jpg" alt="'.get_the_title().'" />';
- }
- ?>
- </div>
- <div class="bottom"><?php dynamic_excerpt(230); ?></div>
- </div>
- </a>
- <?php
- }
- else {
- if ($count < 4){
- echo '
- </header>
- <div id="contant">
- <div class="right">
- <div id="category"><a href="#" class="active">סרטים</a><a href="#">סדרות</a><a href="#">משחקים</a></div>
- <div id="list">
- ';
- } ?>
- <div class="item">
- <?php
- $thumbUrl = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
- if($thumbUrl) {
- echo '<img src="'.$thumbUrl.'" alt="'.get_the_title().'" />';
- }
- else {
- echo '<img src="'.get_bloginfo('template_url').'/images/nopost-image-home.jpg" alt="'.get_the_title().'" />';
- }
- ?>
- <div class="top"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
- <div class="bottom">
- <span><?php dynamic_excerpt(200); ?></span>
- <br/>
- <span><?php echo __('פורסם ע"י').' '.get_the_author_link().' | '.__('בתאריך ', 'sagive').get_the_date().' | '; ?><a href="<?php comments_link(); ?>"><?php comments_number( __('אין תגובות', 'sagive'), __('תגובה אחת', 'sagive'), __('% תגובות', 'sagive') );echo '</a>'; ?></span>
- </div>
- </div>
- <?
- }
- ?>
- <?php $count++; ?>
- <?php endwhile; ?>
- </div>
- <div id="pages">
- <?php wp_pagenavi(); ?>
- </div>
- </div>
- <div class="left">
- <?php
- if ( is_active_sidebar( 'home-sidebar' )) {
- echo '<ul id="home-sidebar" class="home-sidebar">';
- dynamic_sidebar( 'home-sidebar' );
- echo '</ul>';
- } else {
- _e('Drag widgets to home sidebar to display data here.', 'sagive');
- }
- ?>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement