SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    post thumbnails not being displayed

    Hi,
    I am working on a custom loop that do what i need expect for one thing i.e to display thumbnails next to each post. i am new but now its really fustrating to try so much.i must be doing something wrong. pls help
    Code PHP:
     $args=array(
      'orderby' =>'parent',
      'order' =>'asc',
      'post_type' =>'page',
      'post__in' => array(8,14,17,19,21,23,25,27),
       );
       $page_query = new WP_Query($args);?>
    <?php while ($page_query->have_posts()) : $page_query->the_post(); ?>
       <div class="blocks">
               <div class="imgHolder">
                   <?php if(has_post_thumbnail($page_query->post->ID)):
                            echo get_the_post_thumbnail();
                endif;?>
               </div><!--imgHolder-->
                <h1><?php the_title();?></a></h1>
                <p><?php the_excerpt(); ?></p>
       </div><!--blocks-->
    <?php endwhile; ?>
    All those who wander aren't lost.

  2. #2
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is this problem in your blog only on the server hosting or in all other sites it use wp ?!

  3. #3
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by karma22 View Post
    is this problem in your blog only on the server hosting or in all other sites it use wp ?!
    i m creating a custom loop. i am doing something wrong or missing something
    All those who wander aren't lost.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •