HELP get rid of wordpress related posts

Hi, my wordpress website is currently displaying “related” at the bottom of some posts, how do I get rid of this using custom CSS or anything! it also shows buttons at the bottom for the previous post and the next post, which I also really need gone. I am using the Minamaze theme.

Hi

Please try this css, although it might not be the best way to do it.

.jp-relatedposts,
#nav-below {
    display: none;
}
1 Like

I’m not in a position to check that out at the moment, but it looks like it may be something that can be turned off in the back office; a plug-in maybe?

If it’s not that, then you may need to modify the PHP file the theme uses, and just comment that section out. Assuming the theme is set up that way, then create a child theme and modify that, so it’s not affected by any future updates to the original theme.

1 Like

Thank you this worked for getting rid of the buttons!
Related post thing is still there but only shows up on one post…

Thanks, appreciate the help!

i think that should do it. As mentioned above, the best way is to modify the theme files rather than just hiding the stuff from the screen.

IMHO that would be the best way.

There is CSS for #jp-relatedposts {display: none;} but is over-ridden by the inline style

<div id="jp-relatedposts" class="jp-relatedposts" style="display: block;">

I agree the best way would be to create a child theme without that div.

Not recommended, but will “work”
hack files to comment out that block or find a way to remove the inline style so the CSS “none” will have effect - if you don’t mind doing it every time the files get updated
Quick and dirty, would be to add !important to the “none” CSS - likely not a concern here, but !importants can cause problems similar to inline styles and are likewise best avoided when possible

1 Like

Is that what a local stylesheet is called in the language of “Wordpress”?

WordPress themes can come with a CSS file (and also JavaScript functions).

But I think for the the most part they are usually a set of template files.

What some would consider a mess of HTML mixed with PHP code calling WordPress functions, But such is WordPress.

A child theme in effect tells WordPress to “use this file as the template instead” while still using the rest of the theme for everything else.

The benefit of using a child theme is that the parent theme can be updated and WordPress will still use the child theme. i.e. hacked theme files will be replaced, child theme files will not.

1 Like

Probably a bit late now, but since this is a WP related query I have moved this to the WP forum.

2 Likes

@joecode u fixed it?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.