SHARE
TWEET

Contoh Tabel di Category WP Flexithemes

pustakakoran May 13th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Bikin file category baru misalnya: category-table.php
  2.  
  3. Isinya
  4.  
  5. <?php global $theme; get_header(); ?>
  6.  
  7.     <div id="main">
  8.    
  9.         <?php $theme->hook('main_before'); ?>
  10.    
  11.         <div id="content">
  12.             <?php $theme->hook('content_before'); ?>
  13.            
  14.            
  15.            
  16.            
  17.            
  18.            
  19.            
  20.            
  21.     <div style="text-align: center !important;">
  22.         <img src="http://jdih.natunakab.tk/images/logo-natunakab.png" style="width:150px;"/><br/>
  23.         <h3><b>DAFTAR PERATURAN DAERAH (PERDA)<br/>
  24.         KABUPATEN NATUNA</b></h3>
  25.     </div>
  26.            
  27. <?php wpbeginner_numeric_posts_nav(); ?>
  28. <div class="entry clearfix"></div>
  29.  
  30. <table class="myTable" >
  31.                
  32. <tr>
  33. <td bgcolor="#253B80" style="text-align: center; color: #ffffff; font-weight:bold;">NO</td>
  34. <td bgcolor="#253B80" style="text-align: center; color: #ffffff; font-weight:bold;">PERDA KABUPATEN NATUNA</td>
  35. <td bgcolor="#253B80" style="text-align: center; color: #ffffff; font-weight:bold;">TAHUN</td>
  36. <td bgcolor="#253B80" style="text-align: center; color: #ffffff; font-weight:bold;">DILIHAT</td>
  37. </tr>  
  38.    
  39.   <?php $posts=query_posts($query_string . '&orderby=title&order=desc');
  40. while ( have_posts() ) : the_post(); ?>
  41.  
  42.     <tr class="myTable">
  43. <td style="text-align: center;vertical-align: middle;"><?php echo get_post_position_in_reverse(); ?></td>
  44. <td style="text-align: left;vertical-align: middle;"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></td>
  45. <td style="text-align: center;vertical-align: middle;"><?php the_tags('', ', ', ''); ?></td>
  46. <td style="text-align: center;vertical-align: middle;"><?php the_views(); ?></td>
  47.     </tr>
  48. <?php endwhile; ?>
  49.            
  50. </table>
  51.  
  52. <div class="entry clearfix"></div>
  53. <?php wpbeginner_numeric_posts_nav(); ?>
  54.  
  55.  
  56.  
  57.  
  58. <?php $theme->hook('content_after'); ?>
  59.         </div><!-- #content -->
  60.    
  61.         <?php get_sidebars(); ?>
  62.        
  63.         <?php $theme->hook('main_after'); ?>
  64.        
  65.     </div><!-- #main -->
  66.    
  67. <?php get_footer(); ?>
  68.  
  69.  
  70.  
  71. ========================
  72. Bisa dihapus:
  73. <?php wpbeginner_numeric_posts_nav(); ?>
  74. <?php echo get_post_position_in_reverse(); ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top