I'm working on developing a new section of this site for my client, and we're creating 2 custom post types, one called ingredient categories and one called ingredients. I'm using a post relationship to display the ingredients within the category for more customizations.
On this page: hidden link I have a smaller sub-view of the ingredients list (Ingredient Sidebar Listing) which is linked to the ID of the section with the primary view of the ingredients (Fermented Ingredient Listing).
When clicked, the last item in this list is scrolling to the top instead of to the section it should be referencing. All other links work fine.
Hoping for some suggestions on how to fix this, ideally we will have each listing linked to its respective section.
Thanks!
Hi Emily,
Thank you for contacting us and I'll be happy to assist.
I've checked the source code of the page that you shared and noticed that ID "209427" is repeating on it.
Screenshot 1: hidden link
Screenshot 2: hidden link
The second instance of this ID is coming from the view "Ingredient Sidebar Listing", but I'm not sure if the theme or parent Divi builder template is adding the first one. But as a result, the browser is using the first available instance of that ID for the last anchor link and the page scrolls up to the top.
To avoid this, you can add some text like "section-" before the "wpv-post-id" shortcode, in the "CSS ID" setting ( hidden link ) and the anchor link ( hidden link ).
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Thanks for looking into this for me. I discovered that instead of using the section ID option I needed to use the row ID option to create the anchor links - for whatever reason Divi sections like to mess with everything but the rows don't have this problem.
Thanks!