Activity Stream
48,167 MEMBERS
6915 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 4 of 4
  1.     
    #1
    Member

    Default 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>
    That is the code, i want around 9 other of these same thumbnails and posts to be random.

    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


  2.   Sponsored Links

  3.     
    #2
    Member
    Try this sponge... it might help...
    http://wordpress.org/support/topic/d...page?replies=8

  4.     
    #3
    Member
    Website's:
    imdber.org justpaste.me
    PHP 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_timeget_option('date_format') ); ?></span>
    </div>

    </div>
    <?php ?>

  5.     
    #4
    Member
    Thanks mate it worked

    Cheerz


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Posts from categories don't show up
    By Kw3rLn in forum Technical Help Desk Support
    Replies: 8
    Last Post: 25th Jun 2012, 03:21 PM
  2. How to Display Random Posts in WordPress ?
    By thesnake in forum Wordpress
    Replies: 2
    Last Post: 27th Feb 2012, 07:56 PM
  3. help plugin WP random posts display image ?
    By spotlight2000 in forum Wordpress
    Replies: 5
    Last Post: 12th Dec 2011, 06:29 PM
  4. IPB no pics show in posts?
    By Trueno22 in forum IP.Board
    Replies: 13
    Last Post: 15th May 2010, 04:18 PM
  5. Not all posts show up under IE?
    By LinkFire in forum vBulletin
    Replies: 1
    Last Post: 3rd Aug 2009, 06:23 AM

Tags for this Thread

BE SOCIAL