Jump to content

giulianodipaolo

Member
  • Posts

    7
  • Joined

  • Last visited

giulianodipaolo's Achievements

  1. thanks tuanphan actually we opted for a different solution to solve the issue, putting the categories under the main link /blog. anyway thank you so much for your support and kindness. best Giuliano
  2. Hi Tuanphan, I hope you’re doing well! I wanted to follow up on the issue we previously discussed regarding the category highlighting on our blog. We’ve tried a few different approaches since our last message, but unfortunately, the issue persists. Specifically, when navigating through paginated pages within a selected category (for example, https://giulianodipaolo.com/blog?offset=1708948696562&category=mindset), the category highlighting resets, and instead of remaining on the correct category, the "All" category gets highlighted again. Here's one of the JavaScript solutions we attempted to dynamically highlight the selected category, but it didn't resolve the issue: javascript Copy code document.addEventListener("DOMContentLoaded", function() { var urlParams = new URLSearchParams(window.location.search); var category = urlParams.get('category'); if (category) { var menuItems = document.querySelectorAll('.nav-folder-contents a'); menuItems.forEach(function(item) { if (item.href.includes(category)) { item.style.color = '#000'; // Set text color to black item.style.backgroundColor = '#FEC700'; // Set background color item.style.fontWeight = 'bold'; // Set font weight to bold } }); } }); Unfortunately, this approach did not work, and the category highlighting issue persists when navigating through paginated pages. Could you kindly provide any further guidance or suggestions on how we might resolve this? We truly appreciate your ongoing support and assistance. Thank you in advance for your help! Best Giuliano
  3. Hi Tuanphan, I wanted to reach out because we’ve encountered a problem with the category highlighting on our blog. Specifically, when navigating to the next or previous pages within a selected category, such as in this URL: https://giulianodipaolo.com/blog?offset=1708948696562&category=mindset The category highlighting seems to reset and is no longer applied. We’ve tried various CSS approaches to maintain the highlighting, but unfortunately, we haven’t found a solution that works consistently. Would you have any suggestions on how we can ensure that the category remains highlighted even when users navigate through paginated pages within that category? Thank you so much for your continued support and assistance! Best Giuliano
  4. Hi Tuanphan, I wanted to give you a quick update on the issue we were facing with highlighting the "All" category on my blog. After implementing the code you suggested and making a few additional tweaks, we were able to resolve the problem! The final solution involved using a conditional approach to ensure that the "All" category is only highlighted when no specific category is selected. This way, the "All" link doesn't remain highlighted when another category is active. Thank you so much for your kindness and support throughout this process. Your help was invaluable, and I'm really grateful for your assistance! Best Giuliano
  5. Hi Tuanphan, I wanted to thank you for the code you provided—it works perfectly for highlighting the blog categories on my site. However, I’m encountering an issue with the "All" category, which links to the main blog page (https://giulianodipaolo.com/blog). For some reason, I can’t seem to get the "All" category link to highlight like the others. Despite trying different approaches, it just doesn’t seem to respond the same way as the specific category links. If you have any insights or suggestions on how to fix this, I would greatly appreciate it. Thanks again for your help! Giuliano
  6. Yesss, exactly 🙂 can you help me with code? thanks 🙏🏻
  7. Hi everyone, I'm trying to achieve a specific functionality on my Squarespace blog, similar to what can be seen on the Squarespace blog, where the category links are highlighted when they are selected. Here’s what I’m trying to do: I have set up categories on my blog, which can be seen here. I want the category links (located below the header) to be visually highlighted when the user selects a specific category. For example, if someone clicks on "Travel", that link should become bold and change color, indicating it's the active category. I found this CSS code snippet on the forum, which I tried implementing: css Copy code /* blog links */ li.category-item a { font-weight: normal !important; color: red; text-transform: uppercase; } /* Highlight active category link */ li.category-item.active a { font-weight: bold !important; color: blue; /* Ideally, I want this color to change based on the selected category */ } However, this doesn’t seem to work as expected. The links don’t highlight when a category is selected, and I’m not sure if I’m missing something in the implementation. Has anyone successfully implemented a similar feature? Any guidance on how to properly highlight the active category link would be greatly appreciated! Thank you in advance for your help! Best regards, Giuliano Di Paolo
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.