Enhancing user experience by opening blog post links in a new browser tab ensures visitors remain on your site while exploring additional content.
This article will guide you through the steps to configure your WordPress site to open blog post links in a new tab.
Open the Blog module's settings by clicking on the Gear icon
Go to Advanced Tab → CSS ID & Classes → CSS Class
Set the CSS Class divi-blog-module-new-tab
Go to WordPress Dashboard → Divi → Theme Options → Integrations Tab → Head
Add this JS code:
<script>
(function ($) {
$(document).ready(function () {
$(".divi-blog-module-new-tab a").each(function () {
$(this).attr("target", "_blank");
});
});
})(jQuery);
</script>