Results 1 to 4 of 4
-
11th Feb 2012, 08:08 AM #1OPMember
Wordpress Show Random Posts Help
Hello All,
I have a wordpress blog with latest topics on the front page, its in a grid line, thus all the topics show's the thumbnails on the front page and when you click they go to the page.
Code:<?php } elseif(get_option('fp_homepage_layout') == 'grid-items') { ?> <div class="post-item-grid"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { /* if post has a thumbnail */ ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_post_thumbnail('grid-thumb'); ?></a> <?php } ?> <h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="post-item-meta"> <span>In <?php the_category(', ') ?></span> <span>On <?php the_time( get_option('date_format') ); ?></span> </div> </div>
please assist with this code, thanks,.Sponge Bob Reviewed by Sponge Bob on . Wordpress Show Random Posts Help Hello All, I have a wordpress blog with latest topics on the front page, its in a grid line, thus all the topics show's the thumbnails on the front page and when you click they go to the page. <?php } elseif(get_option('fp_homepage_layout') == 'grid-items') { ?> <div class="post-item-grid"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { /* if post has a thumbnail */ ?> Rating: 5
-
11th Feb 2012, 08:11 AM #2Member
Try this sponge... it might help...
http://wordpress.org/support/topic/d...page?replies=8
-
11th Feb 2012, 08:14 AM #3MemberWebsite's:
imdber.org justpaste.mePHP Code:<?php $randomPosts = get_posts('orderby=rand&numberposts=9'); foreach($randomPosts as $post) { ?>
<div class="post-item-grid">
<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { /* if post has a thumbnail */ ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_post_thumbnail('grid-thumb'); ?></a>
<?php } ?>
<h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="post-item-meta">
<span>In <?php the_category(', ') ?></span>
<span>On <?php the_time( get_option('date_format') ); ?></span>
</div>
</div>
<?php } ?>
-
11th Feb 2012, 08:21 AM #4OPMember
Thanks mate it worked
Cheerz
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Posts from categories don't show up
By Kw3rLn in forum Technical Help Desk SupportReplies: 8Last Post: 25th Jun 2012, 03:21 PM -
How to Display Random Posts in WordPress ?
By thesnake in forum WordpressReplies: 2Last Post: 27th Feb 2012, 07:56 PM -
help plugin WP random posts display image ?
By spotlight2000 in forum WordpressReplies: 5Last Post: 12th Dec 2011, 06:29 PM -
IPB no pics show in posts?
By Trueno22 in forum IP.BoardReplies: 13Last Post: 15th May 2010, 04:18 PM -
Not all posts show up under IE?
By LinkFire in forum vBulletinReplies: 1Last Post: 3rd Aug 2009, 06:23 AM
themaPoster - post to forums and...
Version 5.22 released. Open older version (or...