Remove Unwanted Links From The Divi Blog Module
Depending on how you use your Divi Blog module, you may want to limited users from clicking on posts, going to an author archive page, or viewing the categories. By default, these all have links that cannot be turned off, so in this tutorial I am going to show you how to remove the title link and/or meta author and category links in the Divi Blog module.
Be sure to check out all our other tutorials, especially our ongoing Divi Blog module series. You’ll find everything you need and didn’t know you needed there, and if you have any suggestions for new blog related tutorials, let me know!
▶️ Please watch the video above to get all the exciting details! 👆
Add A Custom CSS Class
We are going to start by adding a custom CSS class to the Divi Blog module. Using a custom class like this will make sure that our code only affects the module with this class, rather than affecting other Blog modules on your site.
Open the Divi Blog module settings and go to the Advanced tab and open the CSS ID & Classes toggle. From there, copy and paste or write “pa-blog-no-links” into the CSS Class input field, as shown in the screenshot.
Where To Add The Code Snippets
Now that you have added the custom CSS class to the module, you can proceed and choose one or more of the snippets below. Each one is labeled, and you can use either one, two, or all three of them.
Where To Paste The CSS Code
1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the CSS tab in the custom code window in the Divi Visual Builder.
2. Child Theme
If you are using a child theme, paste this code into the style.css file. If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.
3. Divi Theme Options Integration
Otherwise, paste this code in your Divi>Theme Options>Custom CSS code box.
If you need help understanding where to paste the code, please check out our complete guide about where to add custom code In Divi.
Remove The Divi Blog Module Title Link
This first snippet will disable the cursor on the title link. By default, all the Divi Blog module titles are clickable links that take you to the individual blog posts. But for some reason, if you want to disable this, just use this snippet and the users will not be able to click on them.
/*make Divi Blog module post title link unclickable*/
.pa-blog-no-links .et_pb_post .entry-title a {
pointer-events: none;
}
Remove The Divi Blog Module Author Link
The page this links to would show all posts by the author, but if you only have one author on your blog, then there is absolutely no reason to link your visitors to a separate author archive page. So that would be one reason you may want to remove the link from the author in the Divi Blog module meta.
NOTE that if you are also wanting to remove the category, you can just use the snippet for the category as it will apply to the author as well.
/*make Divi Blog module post meta author link unclickable*/
.pa-blog-no-links .et_pb_post .post-meta span.author.vcard a {
pointer-events: none;
}
Remove The Divi Blog Module Category Link
If you simply want to showcase the blog post category without actually sending users to the category archive page, then this snippet is perfect for you. This would go great with our other tutorial about highlighting the Divi Blog module meta over the featured image.
NOTE that if you want to only hide the link on the category without affecting the author or comments count link, then you will need to add target the link more accurately. See the video to learn more about a workaround for that.
/*make Divi Blog module post meta category link unclickable*/
.pa-blog-no-links .et_pb_post .post-meta a {
pointer-events: none;
}
Be sure to watch the video to see all of this live and in action! Let me know in the comments if you enjoyed this!
What is the code to also remove the author link from the post title module on the specific blog post?
Hi Jelle,
We don’t know as that’s a different module, but most likely you can jus disable the author from that module. If not, just don’t use that module, use Text modules instead since the Post Title module is redundant.