Changeset 629443
- Timestamp:
- 11/24/2012 04:37:11 PM (13 years ago)
- Location:
- related-posts-list-grid-and-slider-all-in-one
- Files:
-
- 2 edited
-
tags/1.7/related.php (modified) (1 diff)
-
trunk/related.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
related-posts-list-grid-and-slider-all-in-one/tags/1.7/related.php
r628980 r629443 266 266 } else { 267 267 $searches = false; 268 } 269 return $searches+$searches; 268 } 269 $idslist = "'" . $post->ID. "'"; 270 if ($mycount > 0) { 271 for ($i = 0; $i < $mycount; $i++) { 272 $idslist = $idslist . ", '" . $searches[$i]->ID. "'"; 273 } 274 } 275 $new_limit = $limit - $mycount; 276 $sql = "SELECT ID,post_title,post_date " 277 . "FROM ". "$wpdb->posts " 278 ." WHERE " 279 ."post_type = 'post' and post_status = 'publish' " 280 . "AND (id NOT IN ($idslist)) " 281 ."LIMIT ".$new_limit; 282 $searches2 = $wpdb->get_results($sql); 283 $merged_searches = array_merge($searches, $searches2); 284 return $merged_searches; 270 285 } 271 286 //------------------------------------------------------------------------ -
related-posts-list-grid-and-slider-all-in-one/trunk/related.php
r628980 r629443 266 266 } else { 267 267 $searches = false; 268 } 269 return $searches+$searches; 268 } 269 $idslist = "'" . $post->ID. "'"; 270 if ($mycount > 0) { 271 for ($i = 0; $i < $mycount; $i++) { 272 $idslist = $idslist . ", '" . $searches[$i]->ID. "'"; 273 } 274 } 275 $new_limit = $limit - $mycount; 276 $sql = "SELECT ID,post_title,post_date " 277 . "FROM ". "$wpdb->posts " 278 ." WHERE " 279 ."post_type = 'post' and post_status = 'publish' " 280 . "AND (id NOT IN ($idslist)) " 281 ."LIMIT ".$new_limit; 282 $searches2 = $wpdb->get_results($sql); 283 $merged_searches = array_merge($searches, $searches2); 284 return $merged_searches; 270 285 } 271 286 //------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.