Home › Forums › General Issues › Creating an array of one field across entire site › Reply To: Creating an array of one field across entire site
Well after thinking a lot about this, I’ve ended up using jQuery to solve my problem whereby it alters the links itself. This can at least give me the option of having a manual navigation using WP Menus.
I think what I’m shooting for is overly complex but it would be good to know if what I’m asking for is feasible in terms of auto-populating a menu.
FYI I used this bit of code to dynamically alter the menu links:
// Alter the links in the navigation so that the page doesn't reload
$(".nav a[href*='" + window.location.pathname + "#']").map(function(){
var currentsection = this.href.split('/').pop();
this.href = currentsection;
});
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 ACF & ACF PRO 6.0.7 are now available.
— Advanced Custom Fields (@wp_acf) January 18, 2023
✨This release contains bug fixes and improvements while we continue to work on the next major release of ACF.https://t.co/wQgAOpwmUI
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.