Advertisement
Guest User

Elevendots - Creare Template Wordpress Parte 4 (single.php)

a guest
May 10th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <?php if(have_posts()) : ?>
  2.  
  3. <?php while(have_posts()) : the_post(); ?>
  4.  
  5. <?php if(is_attachment() || has_post_thumbnail() ) { ?>
  6. <div class="row">
  7. <div class="col s12 m7">
  8. <div class="card">
  9. <div class="card-image">
  10. <img src="<?php the_post_thumbnail_url('medium'); ?>">
  11. <span class="card-title"><?php the_title(); ?></span>
  12. </div>
  13. <div class="card-content"><a style="color:black;" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta( 'display_name' ); ?></a>
  14. <p><?php the_content(); ?></p>
  15. </div>
  16. <div class="card-action">
  17. <?php if(have_posts()) : ?>
  18. <?php while(have_posts()) : the_post(); ?>
  19. <?php if(is_attachment() || has_post_thumbnail() ) { ?>
  20. <div class="row">
  21. <div class="col s12 m7">
  22. <div class="card">
  23. <div class="card-image">
  24. <img src="<?php the_post_thumbnail_url('medium'); ?>">
  25. <span class="card-title"><?php the_title(); ?></span>
  26. </div>
  27. <div class="card-content"><a style="color:black;" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta( 'display_name' ); ?></a>
  28. <p><?php the_content(); ?></p>
  29. </div>
  30. <div class="card-action">
  31. <a href="<?php the_permalink(); ?>">Leggi di piĆ¹</a>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. <?php } ?>
  37. <?php endwhile; ?>
  38. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement