Guest User

mantra theme categories

a guest
Jun 13th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. <div id="front-columns">
  2.  
  3.  
  4.  
  5. <div id="column1"><!-- EDIT CATEGORIES INTO HERE -->
  6. Events
  7. <?php
  8. wp_reset_query();
  9. global $post;
  10. $mypost1 = get_posts('numberposts=1&category=4');
  11. foreach($mypost1 as $post) :
  12.  
  13. $mypost1img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ));
  14. ?>
  15. <a href="<?php echo the_permalink(); ?>"> <div class="column-image" ><img src="<? echo $mypost1img[0]; ?>" id="column1" alt="" /> </div> <h3><?php the_title(); ?></h3> </a><div class="column-text"><?php /* echo $mantra_columntext1 */ ?>
  16. <?php
  17. endforeach;
  18. wp_reset_query();
  19. $myposts1 = get_posts('numberposts=5&offset=1&category=4');
  20. foreach($myposts1 as $post) :
  21. ?>
  22. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  23. <?php endforeach; ?>
  24. </div>
  25. <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="http://www.newhuntsville.com/?cat=4"><?php/* echo $mantra_columnreadmore */?>&raquo;</a> </div><?php } ?>
  26. <? wp_reset_query(); ?>
  27. </div>
  28.  
  29.  
  30.  
  31. <div id="column2">
  32. Music
  33. <?php
  34. global $post;
  35. $mypost2 = get_posts('numberposts=1&category=10');
  36. foreach($mypost2 as $post) :
  37.  
  38. $mypost2img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ));
  39. ?>
  40. <a href="<?php echo the_permalink(); ?>"> <div class="column-image" ><img src="<? echo $mypost2img[0]; ?>" id="column2" alt="" /> </div> <h3><?php the_title(); ?></h3> </a><div class="column-text"><?php /*echo $mantra_columntext2 */?>
  41. <?php
  42. endforeach;
  43. wp_reset_query();
  44. $myposts2 = get_posts('numberposts=5&offset=1&category=10');
  45. foreach($myposts2 as $post) :
  46. ?>
  47. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  48. <?php endforeach; ?>
  49. </div>
  50. <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="http://www.newhuntsville.com/?cat=10"><?php/* echo $mantra_columnreadmore */?>&raquo;</a> </div><?php } ?>
  51. <? wp_reset_query(); ?>
  52. </div>
  53.  
  54.  
  55.  
  56. <?php if($mantra_nrcolumns != '2') { ?>
  57. <div id="column3">
  58. Eat and Drink
  59. <?php
  60. global $post;
  61. $mypost3 = get_posts('numberposts=1&category=3');
  62. foreach($mypost3 as $post) :
  63.  
  64. $mypost3img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ));
  65. ?>
  66. <a href="<?php echo the_permalink(); ?>"> <div class="column-image" ><img src="<? echo $mypost3img[0]; ?>" id="column3" alt="" /> </div> <h3><?php the_title(); ?></h3> </a><div class="column-text"><?php echo $mantra_columntext3 ?></div>
  67. <?php endforeach;
  68. wp_reset_query();
  69. $myposts3 = get_posts('numberposts=5&offset=1&category=3');
  70. foreach($myposts3 as $post) :
  71. ?>
  72. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  73. <?php endforeach; ?>
  74. <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="http://www.newhuntsville.com/?cat=3"><?php /*echo $mantra_columnreadmore*/ ?>&raquo;</a> </div><?php } ?>
  75. <? wp_reset_query(); ?>
  76. </div>
  77.  
  78.  
  79. <?php if($mantra_nrcolumns == '4') { ?>
  80. <div id="column4">
  81. Site News
  82. <?php
  83. global $post;
  84. $mypost4 = get_posts('numberposts=1&category=14');
  85. foreach($mypost4 as $post) :
  86.  
  87. $mypost4img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ));
  88. ?>
  89. <a href="<?php echo the_permalink(); ?>"> <div class="column-image" ><img src="<? echo $mypost4img[0]; ?>" id="column4" alt="" /> </div> <h3><?php the_title(); ?></h3> </a><div class="column-text"><?php echo $mantra_columntext4 ?></div>
  90. <?php endforeach;
  91. wp_reset_query();
  92. $myposts4 = get_posts('numberposts=5&offset=1&category=14');
  93. foreach($myposts4 as $post) :
  94. ?>
  95. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  96. <?php endforeach; ?>
  97. <?php if($mantra_columnreadmore) {?> <div class="columnmore"> <a href="http://www.newhuntsville.com/?cat=14"><?php /*echo $mantra_columnreadmore*/ ?>&raquo;</a> </div><?php } ?>
  98. <? wp_reset_query(); ?>
  99. </div>
  100.  
  101.  
  102. <?php } } ?>
  103. </div>
Advertisement
Add Comment
Please, Sign In to add comment