Results 1 to 1 of 1
-
1st Jan 2012, 04:34 PM #1OPBannedWebsite's:
PornRip.orgHow to display latest posts in search page?
Hey,
I want to display latest posts if there is no post found for certain queries:
http://www.pornrip.org/?s=hkjh
I actually managed it, but it doesn't show thumbnails, it shows only post titles.
I used this code:
PHP Code:<?php
$args = array( 'numberposts' => '40' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '<div class="post"><h3 id="post-<?php the_ID(); ?>"><a href="' . get_permalink($recent["ID"]) . '" title="Look '.$recent["post_title"].'" >' . $recent["post_title"].'</a></h3> </div> ';
}
?>
<?php endif; ?>PornRip.org Reviewed by PornRip.org on . How to display latest posts in search page? Hey, I want to display latest posts if there is no post found for certain queries: http://www.pornrip.org/?s=hkjh I actually managed it, but it doesn't show thumbnails, it shows only post titles. I used this code: <?php $args = array( 'numberposts' => '40' ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Latest pages on homepage instead of latest posts ? Possible ?
By Cojba in forum WordpressReplies: 0Last Post: 12th Apr 2012, 05:12 PM -
How to display two posts horizontally in WordPress?
By ChosenOne in forum WordpressReplies: 1Last Post: 4th Mar 2012, 12:52 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 -
Introduction posts should be removed from 'Latest Posts'
By Faizann20 in forum General DiscussionReplies: 2Last Post: 1st Dec 2010, 10:55 AM
themaManager - edit and manage...
Version 4.21 released. Open older version (or...