First: after one day of playing around with it, I think you guys really nailed it with the Beaver Builder Plugin! Finally a page builder that is suitable to use on a client website
I have a question concerning one-page navigation menus:
Untill now I have been using ACFâs flexible content fields to (kind of) accomplish a way to build pages with different content blocks (sections), which I also used for One-Page sites. To simplify the making of a one-page navigation menu, I used an extra custom field for each section that I made, which I then used to dynamically build a list of menu items (easy, since you donât need to use the WordPress Menu system at all).
Assuming you have a Flexible Content Field called sections, and a custom field called âsection-titleâ, you can do something like this:
Thanks for the kind words! Have you seen our docs on âSmooth Scrollingâ? That may be what you want to build a 1 page site. Let me know if that works!
I do use the ID-field on rows and then use those for the links in my WP menu. What Iâm looking for is a way to loop through all ID-fields that are in use in the different rows on a page, so I can construct my menu dynamically with code (like in my example above), instead of having to manually set up a WP menu for that specific page.
I am not a hardcore dev, so I hope I explain my approach in an understandable way: I guess I need to first get all the rows on a page, then for each row the value of the id-field in the css_selectors array (which is the CSS ID field). If that is not empty -> use it to construct my menu-item link.
AnywayâŚItâs not that important, but I still hope this makes any sense
Tibor and Justin:
I would like to test this but donât understand where to put Justinâs PHP from #10605. For edge-to-edge pages, I use a custom template with .beaver-page custom class.
Do I put PHP in the page template? or in functions.php?
And for one-page navigation menu, #my-unique-id in the WP Menu link URL?
You only need Justinâs code if you dynamically want to add a one-page navigation menu; if youâre using the WP Menu (as your last question suggests), filling in #your-unique-id in the link URL field indeed will do the trick.
That code would go in a page template but itâs not complete. Itâs just an example and still needs the actual menu implementation. Maybe Tibor can send over what he ends up putting together.