MKT Posted May 2, 2022 Posted May 2, 2022 Hello, I've got an issue where two dates are showing on my blog summary page, below the picture and above the title (image below). While I've read the article on how to change blog dates and been deep in the settings, I still cannot for the life of me figure out how to stop this happening. I'd ideally like to have one date there, just not two, does anyone know how to fix this? My Squarespace version is 7.1 (if displaying just one date is not possible, how do I remove it from displaying a date at all?). Thanks team!
tuanphan Posted May 7, 2022 Posted May 7, 2022 Hi, Have you solved it yet? If no, can you share link to a blog post? 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!)
MKT Posted May 9, 2022 Author Posted May 9, 2022 (edited) On 5/7/2022 at 11:21 PM, tuanphan said: On 5/7/2022 at 11:21 PM, tuanphan said: Hi, Have you solved it yet? If no, can you share link to a blog post? Hi, Have you solved it yet? If no, can you share link to a blog post? Hi, not solved yet! Thanks for checking in, I still can’t find a setting for this anywhere… Edited May 14, 2022 by MKT
Solution tuanphan Posted May 11, 2022 Solution Posted May 11, 2022 On 5/9/2022 at 5:23 PM, MKT said: Hi, not solved yet! Thanks for checking in, I still can’t find a setting for this anywhere… The blog is: https://marikaknows.com/ Edit Blog Section >> Disable Primary or Secondary Metadata 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!)
MKT Posted May 14, 2022 Author Posted May 14, 2022 That was it! Got it! Thank you, I'm not sure how it turned on since it never used to be on, but I was able to turn it back off for secondary only!
tuanphan Posted November 4, 2023 Posted November 4, 2023 On 11/2/2023 at 2:05 PM, catalienne said: Hi @tuanphan I am getting 2 different date formats for 2 different blog posts on the blog posts list, I refreshed the date to display but then it goes back to incorrect format. The one #NSBCS.002 from today 2nd november 2023 displays as 11/02/2023 on the blog list but correctly on the blog post. the #NSBCS.001 is fine as 26/10/2023. Very strange! I can see the pub date is showing incorrectly for #NSBCS.002 but how to change that? https://www.nsbcyber.com/signals I need both posts in the blog list to look like dd/mm/yyyy not mm/dd/yyyy. I did insert this code in the code section but this fixed the blog post dates maybe it's causing issues for the date on blog post list now. <!-- Fix inconsistent blog date format on Squarespace 7.1 template --> <!-- Squarespace Forum Update 06-11-2021 --> <script src="https://stevenlevithan.com/assets/misc/date.format.js"></script> <script> (function(){ document.addEventListener('DOMContentLoaded', function() { const dateformat = "dd/mm/yyyy"; const pubdates = document.querySelectorAll("time[datetime]:not([class*=event-time]), time[pubdate], time.blog-meta-item--date"); pubdates.forEach(pubDate => { let d = new Date(pubDate.getAttribute("datetime") || pubDate.innerText); if (pubDate.classList.contains('blog-meta-item--date') ) { d = new Date(document.querySelector('[itemprop="datePublished"]').getAttribute('content').split("T")[0]); } pubDate.innerHTML = d.format(dateformat); }); }); })(); </script> Please help thanks I don't see date now. Do you still need help? Beyondspace 1 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!)
Beyondspace Posted November 4, 2023 Posted November 4, 2023 On 11/2/2023 at 2:05 PM, catalienne said: Hi @tuanphan I am getting 2 different date formats for 2 different blog posts on the blog posts list, I refreshed the date to display but then it goes back to incorrect format. The one #NSBCS.002 from today 2nd november 2023 displays as 11/02/2023 on the blog list but correctly on the blog post. the #NSBCS.001 is fine as 26/10/2023. Very strange! I can see the pub date is showing incorrectly for #NSBCS.002 but how to change that? https://www.nsbcyber.com/signals I need both posts in the blog list to look like dd/mm/yyyy not mm/dd/yyyy. I did insert this code in the code section but this fixed the blog post dates maybe it's causing issues for the date on blog post list now. <!-- Fix inconsistent blog date format on Squarespace 7.1 template --> <!-- Squarespace Forum Update 06-11-2021 --> <script src="https://stevenlevithan.com/assets/misc/date.format.js"></script> <script> (function(){ document.addEventListener('DOMContentLoaded', function() { const dateformat = "dd/mm/yyyy"; const pubdates = document.querySelectorAll("time[datetime]:not([class*=event-time]), time[pubdate], time.blog-meta-item--date"); pubdates.forEach(pubDate => { let d = new Date(pubDate.getAttribute("datetime") || pubDate.innerText); if (pubDate.classList.contains('blog-meta-item--date') ) { d = new Date(document.querySelector('[itemprop="datePublished"]').getAttribute('content').split("T")[0]); } pubDate.innerHTML = d.format(dateformat); }); }); })(); </script> Please help thanks The code has been updated since the last time you use it, could you give this a try? https://forum.squarespace.com/topic/207841-freeshare-date-display-format-options-on-all-pages/?do=findComment&comment=630658 catalienne 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Beyondspace Posted November 5, 2023 Posted November 5, 2023 10 hours ago, catalienne said: Thank you so much @Beyondspace that worked like magic, right date and AU format amazing stuff of legends! You rock! BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment