REMOVE "Related Posts"
-
Hi Everyone!
There are two “related posts” features showing below the posts on my blog (www.foreverashley.com) The first is part of the Jetpack plug-in and I like the way it looks. The other is part of the theme itself and I want to remove it.
You can see it in this post here: https://www.foreverashley.com/sunday-social/
At the bottom of the post it there is a header that says, “Related” followed by three related links and thumbnails. Farther down it says, “Related Posts” and three smaller links. This “related posts” part is part of the theme but I want to take it out and only use the Jetpack “Related” links.
How can I remove it from the theme (Beautiful Day by Idyllic Themes)
I found the following code in the CSS for the single post.php but when I remove it all my site only loads with an error.
Can anyone help?
Thanks!
<div class=”relatedposts”>
<h3>Related posts</h3>
<?php
$orig_post = $post;
global $post;
$tags = wp_get_post_tags($post->ID);if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
‘tag__in’ => $tag_ids,
‘post__not_in’ => array($post->ID),
‘posts_per_page’=>4, // Number of related posts to display.
‘caller_get_posts’=>1
);$my_query = new wp_query( $args );
while( $my_query->have_posts() ) {
$my_query->the_post();
?><div class=”relatedthumb”>
“><?php the_post_thumbnail(array(150,100)); ?>
<?php the_title(); ?>
</div>
- The topic ‘REMOVE "Related Posts"’ is closed to new replies.