Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter allangf

    (@allangf)

    
      <?php
      $blockquotes = array('blockquote-green', 'blockquote-blue', 'blockquote-red', 'blockquote-yellow');
      $args = array( 'numberposts' => -1);
      $posts= get_posts( $args );
      /* for - used possible display the posts with a beautiful layout */
      if ($posts) {
        for ($i = 0; $i < count($posts) ; $i++ ) {
          $post = $posts[$i];
          setup_postdata($post);
          ?>
          <br>
          <!-- Get Post URL-->
          <a href="<?php the_permalink($post) ?>">
            <h4>
              <?php
              echo get_the_title($post);
              ?>
            </h4>
          </a>
          <blockquote class="<?php echo $blockquotes[$i % count($blockquotes)] ?>">
            <?php
            the_excerpt();
            ?>
          </blockquote>
          <br>
          <?php
        }
      }
      ?>
    

    @drixe TKS.

Viewing 1 replies (of 1 total)