TNG Posted June 27, 2023 Posted June 27, 2023 (edited) https://seabass-hexahedron-tcln.squarespace.com/the-bad-directory-base (pass TNG) Hi guys When clicked on, I am wanting to display the active category as a heading above the results, and also highlight the active one in the Archive list. I've searched high and low. How can I do this? Any ideas @tuanphan Also can I change the number of posts per page, and change the text of the "older posts" link? Thank you all in advance 🙂 Steph Edited June 27, 2023 by TNG
tuanphan Posted June 28, 2023 Posted June 28, 2023 Something like this? https://seabass-hexahedron-tcln.squarespace.com/the-bad-directory-base/category/BAD+Business+Member 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!)
Solution tuanphan Posted July 1, 2023 Solution Posted July 1, 2023 Try this code, if it works, we will give code for other items https://seabass-hexahedron-tcln.squarespace.com/the-bad-directory-base/category/BAD+Business+Member Add to Code Injection > Footer <script> if (document.location.pathname.indexOf("/the-bad-directory-base/category/BAD+Business+Member") == 0) { document.querySelector('body').classList.add('bad-business-member') } </script> <style> .bad-business-member .archive-group-name-link[href*="BAD+Business+Member"]:before { content: ''; position: absolute; height: 2px; background: #fdc35a; top: 50%; white-space: pre; width: 100%; } </style> 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!)
TNG Posted July 4, 2023 Author Posted July 4, 2023 Hi @tuanphan, Sorry for my slow reply I had my relatives visiting and was off work for a few days! Thank you so much this seems to work!!! Amazing! Will there be a way also to place a heading on each category page? Appreciate your help so much! Steph
tuanphan Posted July 4, 2023 Posted July 4, 2023 8 hours ago, TNG said: Hi @tuanphan, Sorry for my slow reply I had my relatives visiting and was off work for a few days! Thank you so much this seems to work!!! Amazing! Will there be a way also to place a heading on each category page? Appreciate your help so much! Steph Sorry, I Forgot. Add this code under <style> .bad-business-name .blog-masonry:before { content: "BAD Business Name ABCXYZ"; display: block; text-align: center; margin-bottom: 20px; font-size: 50px; font-weight: bold; } </style> 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!)
TNG Posted July 28, 2023 Author Posted July 28, 2023 (edited) @tuanphan Hi there! Your code was working beautifully but suddenly it's not... any ideas? https://seabass-hexahedron-tcln.squarespace.com/the-bad-directory-base/category/Creative+Spaces pass TNG Edited July 29, 2023 by TNG
TNG Posted July 29, 2023 Author Posted July 29, 2023 Just to clarify, the nav highlight is still working, but the heading before the listing has stopped working... https://seabass-hexahedron-tcln.squarespace.com/the-bad-directory-base/category/Creative+Spaces (sorry my link in the post above was broken) @tuanphan Many thanks!
TNG Posted July 29, 2023 Author Posted July 29, 2023 All good, I have fixed this by adding !important to display:block; ie display: block!important; Thanks! @tuanphan tuanphan 1
tuanphan Posted July 29, 2023 Posted July 29, 2023 You're welcome 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