• Hey members I am new to WP forums so excuse me if i m not abiding with any culture of WordPress. I just wanna know whether we can show Pages in main page grids of Mygrid2 templates rather than posts. If Yes then how, and if No then do I have any other similar option. Thanks in advance to all.

Viewing 4 replies - 1 through 4 (of 4 total)
  • yes we can display the posts also for that changes the query loop.

    Thread Starter amitspecially

    (@amitspecially)

    Thankyou for replying Anjali but it would be a great help. If you can provide some details I am novice with php and i guess its in php so that is All Greek to me. I m just doing R&D with HTML. So if you can provide me with some details i will be thankful to you. Shukriya ??

    Hi use the the following code where you want to display the pages.

    <?php query_posts('post_type=page'); while (have_posts()) : the_post (); ?>
    
    	 <div id="post-<?php the_ID(); ?>" class="post" >
    
    				<?php $thumb=get_post_meta($post->ID, 'associate-thumb', true) ; ?>
                    	<?php if($thumb) : ?>
                        <img src="<?php bloginfo('url'); ?><?php echo get_post_meta($post->ID, 'associate-thumb', true); ?>" alt="<?php get_post_meta($post->ID, 'associate-thumb-alt', true); ?>" />
                        <?php else: ?>
                        <p>no thumb</p>
                        <?php endif; ?>
                    <h3><?php the_title(); ?></h3>
    
    				<p><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">View Profile</a></p>
    
    	</div>
    		<?php endwhile; ?>

    Regards,
    anjali

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to show pages in first page of 'MyGrid 2' template.’ is closed to new replies.