Guest User

Untitled

a guest
Jun 22nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. <div class="cols1">
  2. <div class="left">
  3. <h2>Conference News</h2>
  4. <?php
  5. $get = mysql_query("SELECT * FROM wp_posts, wp_term_relationships WHERE wp_posts.id = wp_term_relationships.object_id ORDER BY post_date DESC;") or die("Mmm pie:" . mysql_error());
  6. $get_number = mysql_num_rows($get);
  7.  
  8. if( $get_number > "0" ) {
  9. $count = 1;
  10. while ( $row = mysql_fetch_object($get) ) {
  11. if ($row->term_taxonomy_id == '3' && $count != 4) { ?>
  12. <h3><span><?php echo substr($row->post_date,0,10); ?> : </span> <a href="<?php echo $row->guid; ?>"><?php echo $row->post_title; ?></a></h3>
  13. <p><?php echo substr(strip_tags($row->post_content),0,100); ?>...</p>
  14. <?php
  15. $count++;
  16. }
  17. }
  18. } ?>
  19. </div>
  20. <div class="right">
  21. <h2>Industry News</h2>
  22. <?php
  23. $get = mysql_query("SELECT * FROM wp_posts, wp_term_relationships WHERE wp_posts.id = wp_term_relationships.object_id ORDER BY post_date DESC;") or die("Mmm pie:" . mysql_error());
  24. $get_number = mysql_num_rows($get);
  25.  
  26. if( $get_number > "0" ) {
  27. $count = 1;
  28. while ( $row = mysql_fetch_object($get) ) {
  29. if ($row->term_taxonomy_id == '4' && $count != 4) { ?>
  30. <h3><span><?php echo substr($row->post_date,0,10); ?> : </span> <a href="<?php echo $row->guid; ?>"><?php echo $row->post_title; ?></a></h3>
  31. <p><?php echo substr(strip_tags($row->post_content),0,100); ?>...</p>
  32. <?php
  33. $count++;
  34. }
  35. }
  36. } ?>
  37. </div>
  38. </div>
  39. <div class="cols1">
  40. <div class="left">
  41. <h2>Upcoming Sessions</h2>
  42. <?php
  43. $get = mysql_query("SELECT * FROM wp_posts, wp_term_relationships WHERE wp_posts.id = wp_term_relationships.object_id ORDER BY post_date DESC;") or die("Mmm pie:" . mysql_error());
  44. $get_number = mysql_num_rows($get);
  45.  
  46. if( $get_number > "0" ) {
  47. $count = 1;
  48. while ( $row = mysql_fetch_object($get) ) {
  49. if ($row->term_taxonomy_id == '5' && $count != 4) { ?>
  50. <h3><span><?php echo substr($row->post_date,0,10); ?> : </span> <a href="<?php echo $row->guid; ?>"><?php echo $row->post_title; ?></a></h3>
  51. <p><?php echo substr(strip_tags($row->post_content),0,100); ?>...</p>
  52. <?php
  53. $count++;
  54. }
  55. }
  56. } ?>
  57. </div>
  58. <div class="right">
  59. <h2>Specials</h2>
  60. <?php
  61. $get = mysql_query("SELECT * FROM wp_posts, wp_term_relationships WHERE wp_posts.id = wp_term_relationships.object_id ORDER BY post_date DESC;") or die("Mmm pie:" . mysql_error());
  62. $get_number = mysql_num_rows($get);
  63.  
  64. if( $get_number > "0" ) {
  65. $count = 1;
  66. while ( $row = mysql_fetch_object($get) ) {
  67. if ($row->term_taxonomy_id == '6' && $count != 4) { ?>
  68. <h3><span><?php echo substr($row->post_date,0,10); ?> : </span> <a href="<?php echo $row->guid; ?>"><?php echo $row->post_title; ?></a></h3>
  69. <p><?php echo substr(strip_tags($row->post_content),0,100); ?>...</p>
  70. <?php
  71. $count++;
  72. }
  73. }
  74. } ?>
  75. </div>
  76. </div>
Add Comment
Please, Sign In to add comment