File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function related_posts() {
1111 array (
1212 'category__in ' => wp_get_post_categories ( $ current_post_id ),
1313 'posts_per_page ' => 4 ,
14- 'orderby ' => 'rand ' ,
14+ 'orderby ' => 'rand ' ,
1515 'post__not_in ' => array ( $ current_post_id ) // exlcude currnet post
1616 )
1717 );
@@ -23,9 +23,9 @@ function related_posts() {
2323 while ( $ related ->have_posts () ) { $ related ->the_post ();
2424
2525 // related post data
26- $ post_id = get_the_ID ();
27- $ post_title = get_the_title ( $ post_id );
28- $ post_permalink = get_the_permalink ( $ post_id );
26+ $ post_id = get_the_ID ();
27+ $ post_title = get_the_title ( $ post_id );
28+ $ post_permalink = get_the_permalink ( $ post_id );
2929 $ post_featured_image = get_the_post_thumbnail ( $ post_id , 'medium ' );
3030
3131 // entry div structure
@@ -48,4 +48,4 @@ function related_posts() {
4848
4949 wp_reset_postdata ();
5050
51- }
51+ }
You can’t perform that action at this time.
0 commit comments