orneverornow Posted October 9 Posted October 9 Site URL: https://www.nima-spaces.ch/projekte Hello there I want the active link of my filter (categories) in the blog (subpage Projekte) to be underlined: https://www.nima-spaces.ch/projekte If I now select ALLE, Private Living or Real Estate, the links are not underlined when active. I appreciate your help. Best Sibylle
Solution tuanphan Posted October 11 Solution Posted October 11 You can use this code to Website Tools > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function() { const url = window.location.href; if (url.includes('/tag/ALLE')) { $('body').addClass('alle'); } else if (url.includes('/Private+Living')) { $('body').addClass('private-living'); } else if (url.includes('/tag/Real+Estate')) { $('body').addClass('real-estate'); } }); </script> <style> body.real-estate li.archive-group a[href*="/tag/Real+Estate"] { border-bottom: 1px solid #000; } body.private-living li.archive-group a[href*="/tag/Private+Living"] { border-bottom: 1px solid #000; } body.alle li.archive-group a[href*="/tag/ALLE"] { border-bottom: 1px solid #000; } </style> In the future, if you want to use Filter Links on Portfolio Page, you can also use this solution, instead of creating blog page Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment