Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <?php
  2. if (is_single()) {
  3. while (have_posts()) : the_post();
  4. // get thumbnail
  5. wikiwp_get_thumbnail($post);
  6. ?>
  7. <div>This should stay here in a post</div>
  8. <div>And this should also be visible in this case</div>
  9.  
  10.  
  11. <?php
  12. endwhile;
  13. } else {
  14.  
  15. ?>
  16.  
  17. <div>This should stay here in a page</div>
  18.  
  19. <?php
  20. }
  21. ?>
  22.  
  23. <?php
  24. if (is_page()) {
  25. while (have_posts()) : the_post();
  26. // get thumbnail
  27. wikiwp_get_thumbnail($post);
  28. ?>
  29.  
  30. <?php
  31. endwhile;
  32. } else {
  33.  
  34. ?>
  35.  
  36. [thumbnail]
  37. This should stay here
  38. And this should also be visible in this case
  39.  
  40. [thumbnail]
  41. This should stay here on a page
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement