I’m a long time user of the Related Post Thumbnails plugin for WordPress, by WPBrigade. The free version serves my purposes, but it came with a slight annoyance. This is what I did as a Related Posts Thumbnails plugin H2 fix.
The plugin creates a listing of related post, with a thumbnail, in a post, or a page, if you like. Problem is, the list of post/s created is done with a H2 heading for its title. So, if you have a list of three related posts, each will have its own H2 header.
This annoying behaviour screws up Search Engine Optimisation (SEO), which doesn’t bother me much; but also messes up another plugin I use, Easy Table of Contents by Magazine3. I can’t exclude it from being inserted into a table of contents, which upsets the segmentation of topics. It makes for an unplesant navigation experience.
The current version is 4.2.1, and the fix is to edit line 1221, by replacing the h2 with p.
$title = '<h2 class="relpost_card_title">' . esc_html($title) . '</h2>';
That got rid of the H2 headers, and Easy Table of Contents are not picking it up and adding them automatically anymore.
Be First to Comment