pscfoto Posted October 13 Posted October 13 Hi you all, has anybody a solution for having the projects of a portfolio in a menu generated automatically? Let say my portfolio page has a project per year, for let's say 10-20 years... Or I just want to update/change regularly my portfolio. Manual solutions are not very helpful in such cases if you need to change around the whole website links and lists that are manually done. It would be nice to have also automated a duplicate in the footer (or any other section) of any menu you may have in your header section. I like a bit of redundancy so visitors can always reach any page from different places in the website. It is very annoying to have to go to the beginning to just navigate another project or another part of the website that is not in the main menu. Maybe there is already a solution for this and I just don't know how or where to find it. 😉 Where can I make of all of this a feature request? Thanks!
tuanphan Posted October 30 Posted October 30 You can do this, follow these quick steps. Here I tested on my test site. If it doesn't work on your site, you can send portfolio page url, I will check easier. #1. First, edit Site Footer > Add a Code Block > Paste this code <div class="footer-portfolio-nav"></div> #2. Use this code to Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function() { $('#gridThumbs .grid-item').each(function() { var title = $(this).find('h3').text(); var link = $(this).attr('href'); var footerItem = $('<a>', { href: link, text: title, class: 'footer-portfolio-item' }); $('.footer-portfolio-nav').append(footerItem); }); }); </script> It will copy all items from Portfolio Page and add it to Footer 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