Advertisement
Guest User

front-page.php

a guest
Dec 9th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.19 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <!-- BEGIN FRONT-PAGE.PHP -->
  4.  
  5. <?php $options = get_option( 'stw_theme_options' ); // Theme-Optionen ?>
  6.              
  7.                 <div class="ym-col1">
  8.                     <div class="ym-cbox">
  9.          
  10.                         <?php
  11.             /**
  12.              * Grußwort auf Startseite anzeigen
  13.              */
  14.  
  15.              if ($options['grusswort'] == 1) {
  16.                if (is_front_page()) : // Nur auf Startseite anzeigen
  17.                  if (!is_paged()) :  // Nicht anzeigen wenn > Seite 1
  18.                    $page_id = $options['grusswort_id'];
  19.                    $page_data = get_page( $page_id );
  20.                    $content = apply_filters('the_content', $page_data->post_content);
  21.                    $title = apply_filters('the_title', $page_data->post_title);
  22.                    ?>
  23.                    <div class="grusswort">
  24.                      <?php echo $content; ?>
  25.                    </div>
  26.               <?php
  27.               endif; // end if_paged
  28.             endif; // end if_front_page
  29.             ?>
  30.             <?php } // end $options ?>
  31.      
  32.             <?php
  33.             /**
  34.              * Wichtige Beiträge anzeigen
  35.              */
  36.            
  37.             // ID's der wichtigen Beiträge aus den Theme Optionen auslesen und in ein Array umwandeln
  38.             $post_id = explode(',',$options['wichtige_posts_ids']);
  39.             //debugVar($post_id);
  40.             ?>
  41.  
  42.             <?php
  43.             if ($options['wichtige_posts'] == 1) {
  44.             if (is_front_page()) : // Nur auf Startseite anzeigen
  45.               if (!is_paged()) :  // Nicht anzeigen wenn > Seite 1
  46.               ?>
  47.                 <div class="ym-grid ym-equalize linearize-level-1 startseite">
  48.                   <div class="ym-g50 ym-gl">
  49.                     <div class="ym-gbox">
  50.                       <?php wichtige_beitraege($post_id[0]); ?>
  51.                     </div>
  52.                   </div>
  53.                   <div class="ym-g50 ym-gr">
  54.                     <div class="ym-gbox">
  55.                       <?php wichtige_beitraege($post_id[1]); ?>
  56.                     </div>
  57.                   </div>
  58.                 </div>
  59.                 <div class="ym-grid ym-equalize linearize-level-1 startseite">
  60.                   <div class="ym-g33 ym-gl">
  61.                     <div class="ym-gbox">
  62.                       <?php wichtige_beitraege($post_id[2]); ?>
  63.                     </div>
  64.                   </div>
  65.                   <div class="ym-g33 ym-gl">
  66.                     <div class="ym-gbox">
  67.                       <?php wichtige_beitraege($post_id[3]); ?>
  68.                     </div>
  69.                   </div>
  70.                   <div class="ym-g33 ym-gr">
  71.                     <div class="ym-gbox">
  72.                       <?php wichtige_beitraege($post_id[4]); ?>
  73.                     </div>
  74.                   </div>
  75.                 </div>                
  76.               <?php
  77.               endif; // end if_paged
  78.             endif; // end if_front_page
  79.             } // end $options
  80.             ?>
  81.  
  82.             <h2 id="neuigkeiten">Weitere Neuigkeiten aus Steinweiler</h2>            
  83.             <?php if ( have_posts() ) : ?>
  84.              
  85.               <?php
  86.               // Wichtige Beiträge ausschließen
  87.               $query = new WP_Query( array( 'post__not_in' => $post_id ) );
  88.               // Start the Loop
  89.               while ( $query->have_posts() ) : $query->the_post();
  90.               ?>
  91.              
  92.                 <?php get_template_part( 'content', get_post_format() ); ?>
  93.              
  94.               <?php endwhile; ?>
  95.            
  96.               <?php if (function_exists('postbar')) postbar(); ?>
  97.            
  98.             <?php else : ?>
  99.  
  100.               <div id="post-0" class="post no-results not-found">
  101.                 <h3>Nichts gefunden ...</h3>
  102.                 <div class="post-content">
  103.                   <p>... was den Suchkriterien entspricht. Neue Suche:</p>
  104.                   <?php get_search_form(); ?>
  105.                 </div>
  106.               </div><!-- #post-0 -->
  107.            
  108.             <?php endif; ?>
  109.  
  110.                     </div> <!-- end ym-cbox -->
  111.                 </div> <!-- end ym-col1 -->
  112.        
  113. <!-- END FRONT-PAGE.PHP -->
  114.  
  115. <?php get_sidebar(); ?>
  116. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement