socialstylate Posted August 11 Share Posted August 11 Hello, I am using the blog feature to function as a directory list of schools on my website. Each blog post is an individual page for a school. I would like to replace the current next/last pagination links on the blog pages with a link back to the main blog. Is that possible? If so, would like the text to be left aligned on the page and say 'Show All Schools'. Thank you! Blog URL: https://stingray-toucan-3sex.squarespace.com/register PW: PYogi2024!! Link to comment
tuanphan Posted August 14 Share Posted August 14 You mean Remove both text Add a text in middle with name: Show All Schools and link to directory list 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!) Link to comment
socialstylate Posted August 14 Author Share Posted August 14 3 hours ago, tuanphan said: You mean Remove both text Add a text in middle with name: Show All Schools and link to directory list page? Yes, sorry for any confusion. I'd like the text that says "Show All Schools" to be left aligned, but if centered on the page is the only option, I will take it! Since I've posted this, I made the site live. You can see the registration page here: https://petiteyogi.com/register Thank you! Link to comment
tuanphan Posted August 17 Share Posted August 17 On 8/14/2024 at 8:01 PM, socialstylate said: Yes, sorry for any confusion. I'd like the text that says "Show All Schools" to be left aligned, but if centered on the page is the only option, I will take it! Since I've posted this, I made the site live. You can see the registration page here: https://petiteyogi.com/register Thank you! How about right text? Remove left + right, then add Show All Schools on left side? 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!) Link to comment
socialstylate Posted August 21 Author Share Posted August 21 On 8/17/2024 at 3:59 AM, tuanphan said: How about right text? Remove left + right, then add Show All Schools on left side? That would be great! Do you know what code I need to use for this? Thank you! Link to comment
Solution Lesum Posted August 22 Solution Share Posted August 22 (edited) @socialstylate Hi! You can add this code to Website > Pages > Website Tools > Code Injection > Header to display the custom pagination "Show All Schools." <script> document.addEventListener('DOMContentLoaded', function() { const anchorTag = document.createElement('a'); anchorTag.href = 'https://petiteyogi.com/register'; anchorTag.textContent = 'Show All Schools'; anchorTag.className = 'custom-pagination item-pagination-title'; const iconDiv = document.createElement('div'); iconDiv.className = 'item-pagination-icon icon icon--stroke'; iconDiv.innerHTML = ` <svg class="caret-right-icon--small" viewBox="0 0 9 16"> <polyline fill="none" stroke-miterlimit="10" points="1.6,1.2 6.5,7.9 1.6,14.7"></polyline> </svg> `; anchorTag.prepend(iconDiv); const itemPagination = document.getElementById('itemPagination'); if (itemPagination) { itemPagination.appendChild(anchorTag); } }); </script> <style> .item-pagination-link--prev, .item-pagination-link--next { display: none !important; } a.custom-pagination.item-pagination-title { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; align-content: center; gap: 15px; } .custom-pagination .icon, .custom-pagination svg { width: 18px !important; height: 32px !important; transform: rotate(90deg); } #itemPagination { display: flex; justify-content: flex-start; } </style> Let me know how it goes. Thanks! Edited August 22 by Lesum Updated code: left-arrow-icon If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
socialstylate Posted August 22 Author Share Posted August 22 22 hours ago, Lesum said: @socialstylate Hi! You can add this code to Website > Pages > Website Tools > Code Injection > Header to display the custom pagination "Show All Schools." <script> document.addEventListener('DOMContentLoaded', function() { const anchorTag = document.createElement('a'); anchorTag.href = 'https://petiteyogi.com/register'; anchorTag.textContent = 'Show All Schools'; anchorTag.className = 'custom-pagination item-pagination-title'; const iconDiv = document.createElement('div'); iconDiv.className = 'item-pagination-icon icon icon--stroke'; iconDiv.innerHTML = ` <svg class="caret-right-icon--small" viewBox="0 0 9 16"> <polyline fill="none" stroke-miterlimit="10" points="1.6,1.2 6.5,7.9 1.6,14.7"></polyline> </svg> `; anchorTag.prepend(iconDiv); const itemPagination = document.getElementById('itemPagination'); if (itemPagination) { itemPagination.appendChild(anchorTag); } }); </script> <style> .item-pagination-link--prev, .item-pagination-link--next { display: none !important; } a.custom-pagination.item-pagination-title { display: flex; flex-direction: row-reverse; justify-content: center; flex-wrap: wrap; align-items: center; align-content: center; gap: 15px; } .custom-pagination .icon, .custom-pagination svg { width: 18px !important; height: 32px !important; } #itemPagination { display: flex; justify-content: flex-start; } </style> Let me know how it goes. Thanks! This looks great! Thanks so much for providing the code. One other request. Is there a way to update the code so that the caret/arrow is to the left of the "Show All Schools" text and is pointing left? Link to comment
Lesum Posted August 22 Share Posted August 22 @socialstylate Hi! I just updated the code in my previous comment. Please remove the previous code and add the new code. If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
socialstylate Posted August 23 Author Share Posted August 23 23 hours ago, Lesum said: @socialstylate Hi! I just updated the code in my previous comment. Please remove the previous code and add the new code. Thank you! I added the code from your previous comment and I don't see a change. You can see the page I'm looking at here: https://petiteyogi.com/register/avon-grove-intermediate-school Do I have the code wrong? Link to comment
Lesum Posted August 24 Share Posted August 24 @socialstylate The updated code isn't appearing on your site from my end; it’s still showing the previous code I shared. Please try adding the entire code again. If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
socialstylate Posted August 24 Author Share Posted August 24 14 hours ago, Lesum said: @socialstylate The updated code isn't appearing on your site from my end; it’s still showing the previous code I shared. Please try adding the entire code again. I accidentally copied the code from when I quoted you - sorry about that. Thank you so much - the code works and it looks great! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment