Advertisement
Guest User

Untitled

a guest
May 15th, 2011
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.69 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: NEW Index
  4. */
  5. ?>
  6.  
  7. <?php get_header() ?>
  8.         <div id="content">
  9.         <?php locate_template( array( 'leftsidebar.php' ), true ) ?>
  10.                 <div class="padder">
  11.                 <?php do_action( 'bp_before_blog_home' ) ?>
  12.                 <div class="page" id="blog-latest">
  13.                                         <div class="post2" id="post-<?php the_ID(); ?>">
  14.                                                 <div class="post-content1">
  15.                                                
  16. <!-- start page content -->      
  17. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  18.                    
  19. <?php the_content( __( '<p class="serif">Read the rest of this page &rarr;</p>', 'buddypress' ) ); ?>
  20. <?php wp_link_pages( array( 'before' => __( '<p><strong>Pages:</strong> ', 'buddypress' ), 'after' => '</p>', 'next_or_number' => 'number')); ?>
  21.  
  22. <?php endwhile; endif; ?>
  23. <!-- end page content -->  
  24.                                                
  25.                                                
  26. <?php if ( !is_user_logged_in() ) : ?>
  27.                                                
  28.  
  29.            
  30.            
  31.             <table width="100%" cellspacing="5" cellpadding="5" style="border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; border-bottom-style: solid; border-bottom-width: 0px; border-bottom-color: #202020;">
  32.    
  33.     <tr>
  34.         <td class="newnav2" width="33%" style="border-right:5px solid white"><a href="http://www.riotcart.com/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&cs-riotcat1-0=&search=Search" title="Start shopping"><img src="http://www.riotcart.com/wp-content/uploads/2010/11/shop1.gif" alt="Shop"></a></td>
  35.         <td class="newnav2" width="33%" style="border-right:5px solid white"><a href="http://www.riotcart.com/shop-hosting/" title="Start selling"><img src="http://www.riotcart.com/wp-content/uploads/2010/11/sell1.gif" alt="Sell"></a></td>
  36.         <td class="newnav2" width="33%"><a href="http://www.riotcart.com/register/" title="Start rioting"><img src="http://www.riotcart.com/wp-content/uploads/2010/11/riot1.gif" alt="Riot"></a></td>
  37.     </tr>    
  38.     <tr>
  39.         <td width="33%"><b>No password? No problem!</b> Shop any
  40.         RiotCart.com vendor you'd like, without having to create an
  41.         account with us! Just start browsing by
  42.         <a href="http://www.riotcart.com/shops">shop</a> or
  43.         <a href="http://www.riotcart.com/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&cs-riotcat1-0=&search=Search">
  44.         item</a>, click, and buy.</td>
  45.         <td width="33%"><b>Get more than a cart, get a full featured
  46.         e-commerce website!</b> RiotCart.com shops offer all kinds of
  47.         <a href="http://www.riotcart.com/shop-hosting/">features</a> that
  48.         you can't get anywhere else. </td>
  49.         <td width="33%"><b>Kick off your combat boots and stay a while</b>...become
  50.         a full-fledged Rioter! Members get a personal profile with friend
  51.         connections, wishlists, private messaging,
  52.         <a href="http://www.riotcart.com/join-the-riot/">and more</a>.</td>
  53.     </tr>
  54. </table>
  55.  
  56. <br />
  57.  
  58. <?php endif; ?>
  59.                                                
  60.                                                
  61.                                                  <div class="newnav2">
  62.  
  63.  
  64.  
  65.             <a href="http://www.riotcart.com/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&cs-riotcat1-0=&search=Search" title="Click for more newly listed items!"><img src="http://www.riotcart.com/wp-content/uploads/2011/01/newinshops4.gif"></a>
  66.  
  67.  
  68.  
  69.             </div>
  70.  
  71.  
  72.  
  73. <br />
  74.  
  75.                                                 <table class="latestmain" cellpadding="0" cellspacing="1px">
  76.  
  77.  
  78. <?php if (function_exists('get_featured_content_showcase')) {
  79.     echo get_featured_content_showcase();
  80. }
  81. ?>
  82.  
  83. <br />
  84.  
  85. <?php
  86.  
  87. $term = get_term_by('slug','blog', 'post_tag');
  88. $term2 = get_term_by('slug','gallery', 'post_tag');
  89. $args=array(
  90.   'tag__not_in' => array($term->term_id, $term2->term_id),
  91.   'category' => '-1',
  92.   'post_type' => 'post',
  93.   'post_status' => 'publish',
  94.   'numberposts' =>5,
  95.   'meta_key' => 'thumbnail',
  96.   'caller_get_posts'=> 1
  97. );
  98.  
  99. $latest = get_posts($args);
  100. $count = 0;
  101. foreach($latest as $post) {
  102.    
  103.         $blogid = get_post_meta($post->ID, 'blogid', true);
  104.         $image = get_post_meta($post->ID, 'thumbnail', true);
  105.        
  106.         if ($count % 3 == 0)
  107.                 echo '<tr>';
  108.         echo '<td>';
  109.        
  110.         do_action( 'bp_before_blog_post' );
  111.      
  112.        
  113.  
  114. ?>
  115.  
  116.  
  117.        
  118.         <div class="crop2">
  119.  
  120.                            
  121.  
  122.                            
  123.  
  124.                         <?php
  125.                        
  126.                         $image1=get_post_meta($post->ID, 'thumbnail', true);
  127.                         $price1=get_post_meta($post->ID, 'price', true);
  128.                        
  129.                          ?>
  130.  
  131.                         <?php if ( $image1 ) : ?>
  132.  
  133.                         <p><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php echo $price1; ?>"><img src="<?php echo $image1; ?>" width="148px" alt="<?php echo $price1; ?>"</img></a></p>
  134.  
  135.                         <?php else : ?>
  136.  
  137.                         <p><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( '', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><img src="http://www.riotcart.com/wp-content/uploads/2010/11/noimg230.jpg" width="148px" height="90px"</img></a></p>
  138.  
  139.                         <?php endif; ?>
  140.  
  141.                         <div class="croptext1">
  142.  
  143.                         <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
  144.  
  145.                         </div>
  146.  
  147.                            
  148.  
  149.                     </div>
  150.  
  151.        
  152.  
  153. <?php
  154.  
  155.         do_action( 'bp_after_blog_post' );
  156.        
  157.         echo '</td>';
  158.        
  159.         $count++;
  160.        
  161.         if ($count % 3 == 0)
  162.                 echo '</tr>';
  163. }
  164.  
  165. ?>
  166.  
  167. </table>
  168.                                                 </td>
  169.                                                
  170.  
  171. </tr>
  172.  
  173. <tr><a href="http://www.riotcart.com/?search-class=DB_CustomSearch_Widget-db_customsearch_widget&widget_number=preset-default&cs-riotcat1-0=&search=Search">&larr; Older Items</a></tr>
  174. </table>
  175.                                                
  176.                                                 </div>
  177.  
  178.                                         </div>
  179.  
  180.        
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.            
  200.  
  201.  
  202.  
  203.                 </div>
  204.                
  205.                
  206.  
  207.                 <?php do_action( 'bp_after_blog_home' ) ?>
  208.                
  209.                 </div><!-- .padder -->
  210.                
  211.                
  212.                
  213.                
  214.                
  215.                
  216.  
  217.  
  218.  
  219.  
  220.  
  221.         </div><!-- #content -->
  222.        
  223.         <?php locate_template( array( 'sidebar.php' ), true ) ?>
  224.  
  225. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement