Advertisement
livefree

XF Forums Wordpress template

Feb 10th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.10 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Community
  4. */
  5. ?>
  6. <!DOCTYPE html>
  7. <html <?php language_attributes(); ?>>
  8. <head>
  9. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  10. <title><?php
  11.     global $page, $paged;
  12.     wp_title( '|', true, 'right' );
  13.     bloginfo( 'name' );
  14.     $site_description = get_bloginfo( 'description', 'display' );
  15.     if ( $site_description && ( is_home() || is_front_page() ) )
  16.         echo " | $site_description";
  17.     if ( $paged >= 2 || $page >= 2 )
  18.         echo ' | ' . sprintf( __( 'Page %s', 'tie' ), max( $paged, $page ) );
  19.     ?></title>
  20. <link rel="profile" href="http://gmpg.org/xfn/11" />
  21. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  22. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  23. <?php wp_head(); ?>
  24. <link href='http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold' rel='stylesheet' type='text/css'/>
  25. </head>
  26. <?php global $is_IE ?>
  27. <body id="top" <?php body_class(); ?>>
  28.     <div class="background-cover"></div>
  29.     <div class="wrapper">
  30.         <header style="margin: 20px auto 0px !important;">
  31.             <div class="top-nav">
  32.             <?php if(tie_get_option( 'top_date' )):
  33.                 if( tie_get_option('todaydate_format') ) $date_format = tie_get_option('todaydate_format');
  34.                 else $date_format = 'l ,  j  F Y';
  35.             ?>
  36.                 <span class="today-date"><?php  echo date_i18n( $date_format , current_time( 'timestamp' ) ); ?></span><?php endif; ?>
  37.                    
  38.                 <?php wp_nav_menu( array( 'container_class' => 'top-menu', 'theme_location' => 'top-menu', 'fallback_cb' => 'tie_nav_fallback'  ) ); ?>
  39.                 <?php echo tie_alternate_menu( array( 'menu_name' => 'top-menu', 'id' => 'top-menu-mob' ) ) ?>
  40.  
  41.  
  42.     <?php if(tie_get_option( 'top_right' ) == 'search'): ?>
  43.                     <div class="search-block">
  44.                         <form method="get" id="searchform" action="<?php echo home_url(); ?>/">
  45.                             <input class="search-button" type="submit" value="<?php if( !$is_IE ) _e( 'Search' , 'tie' ) ?>" />
  46.                             <input type="text" id="s" name="s" value="<?php _e( 'Search...' , 'tie' ) ?>" onfocus="if (this.value == '<?php _e( 'Search...' , 'tie' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search...' , 'tie' ) ?>';}"  />
  47.                         </form>
  48.                     </div><!-- .search-block /-->
  49.     <?php elseif( tie_get_option('top_right') == 'social' ):
  50.         tie_get_social( 'yes' , 16 , 'tooldown' ); ?>
  51.     <?php endif; ?>
  52.  
  53.             </div><!-- .top-menu /-->
  54.            
  55.         <div class="header-content">
  56. <?php $logo_margin =''; if( tie_get_option( 'logo_margin' )) $logo_margin = ' style="margin-top:'.tie_get_option( 'logo_margin' ).'px"';  ?>
  57.             <div class="logo"<?php echo $logo_margin ?>>
  58.             <?php if( !is_singular() ) echo '<h1>'; else echo '<h2>'; ?>
  59. <?php if( tie_get_option('logo_setting') == 'title' ): ?>
  60.                 <a  href="<?php echo home_url() ?>/"><?php bloginfo('name'); ?></a>
  61.                 <span><?php bloginfo( 'description' ); ?></span>
  62.                 <?php else : ?>
  63.                 <?php if( tie_get_option( 'logo' ) ) $logo = tie_get_option( 'logo' );
  64.                         else $logo = get_template_directory_uri().'/images/logo.png';
  65.                 ?>
  66.                 <a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
  67.                     <img src="<?php echo $logo ; ?>" alt="<?php bloginfo('name'); ?>" /><strong><?php bloginfo('name'); ?> <?php bloginfo( 'description' ); ?></strong>
  68.                 </a>
  69. <?php endif; ?>
  70.             <?php if( !is_singular() ) echo '</h1>'; else echo '</h2>'; ?>
  71.             </div><!-- .logo /-->
  72.             <?php tie_banner('banner_top' , '<div class="ads-top">' , '</div>' ); ?>
  73.             <div class="clear"></div>
  74.         </div> 
  75.         <?php $stick = ''; ?>
  76.         <?php if( tie_get_option( 'stick_nav' ) ) $stick = 'class="fixed-enabled"' ?>
  77.             <nav id="main-nav"<?php echo $stick; ?> style="margin-bottom: 0px; border-bottom: none;">
  78.                 <?php wp_nav_menu( array( 'container_class' => 'main-menu', 'theme_location' => 'primary' ,'fallback_cb' => 'tie_nav_fallback'  ) ); ?>
  79.                 <?php echo tie_alternate_menu( array( 'menu_name' => 'primary', 'id' => 'main-menu-mob' ) ) ?>
  80.                 <?php if(tie_get_option( 'random_article' )): ?>
  81.                 <a href="<?php echo home_url(); ?>/?random" class="random-article ttip" title="<?php _e( 'Random Article' , 'tie' ) ?>"><?php _e( 'Random Article' , 'tie' ) ?></a>
  82.                 <?php endif ?>
  83.             </nav><!-- .main-nav /-->
  84.    
  85.         </header><!-- #header /-->
  86.    
  87.  
  88.  
  89.     <?php tie_include( 'breaking-news' ); // Get Breaking News template ?> 
  90.  
  91. <?php
  92. $sidebar = '';
  93.  
  94. if( tie_get_option( 'sidebar_pos' ) == 'left' ) $sidebar = ' sidebar-left';
  95. if( is_single() || is_page() ){
  96.     $get_meta = get_post_custom($post->ID);
  97.    
  98.     if( !empty($get_meta["tie_sidebar_pos"][0]) ){
  99.         $sidebar_pos = $get_meta["tie_sidebar_pos"][0];
  100.  
  101.         if( $sidebar_pos == 'left' ) $sidebar = ' sidebar-left';
  102.         elseif( $sidebar_pos == 'full' ) $sidebar = ' full-width';
  103.         elseif( $sidebar_pos == 'right' ) $sidebar = ' sidebar-right';
  104.     }
  105. }
  106. ?>
  107.     <div id="main-content" class="container<?php echo $sidebar ; ?>" style="width: 1045px; padding: 0px; margin: 0px auto 25px;">
  108.  
  109.     <div class="content">
  110.        
  111.         <?php if ( ! have_posts() ) : ?>
  112.             <div id="post-0" class="post not-found post-listing">
  113.                 <h1 class="post-title"><?php _e( 'Not Found', 'tie' ); ?></h1>
  114.                 <div class="entry">
  115.                     <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'tie' ); ?></p>
  116.                     <?php get_search_form(); ?>
  117.                 </div>
  118.             </div>
  119.         <?php endif; ?>
  120.        
  121.         <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  122.         <?php $get_meta = get_post_custom($post->ID);  ?>
  123.                
  124.         <article>
  125.             <div class="post-inner" style="padding: 0px;">
  126.                 <div class="entry">
  127.                     <?php the_content(); ?>
  128.                     <?php //Below Post Banner
  129.         if( empty( $get_meta["tie_hide_below"][0] ) ){
  130.             if( !empty( $get_meta["tie_banner_below"][0] ) ) echo '<div class="ads-post" style="padding: 20px;">' .htmlspecialchars_decode($get_meta["tie_banner_below"][0]) .'</div>';
  131.             else tie_banner('banner_below' , '<div class="ads-post" style="padding: 20px;">' , '</div>' );
  132.         }
  133.         ?>
  134.  
  135.                 </div><!-- .entry /--> 
  136.            
  137.             </div><!-- .post-inner -->
  138.         </article><!-- .post-listing -->
  139.         <?php endwhile; ?>
  140.     </div><!-- .content -->
  141.  
  142. <?php get_sidebar(); ?>
  143. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement