patronage / bubs-next

Headless Wordpress + Next.js Project scaffolding
https://bubs-next.vercel.app
MIT License
37 stars 10 forks source link

WP headless redirect using get_the_id(), which sometimes returns the wrong thing #217

Closed ccorda closed 2 years ago

ccorda commented 2 years ago

WP will redirect a request for /foo to the wrong path (the path of the first post in the WP database). This is because we're using a loop function, when instead we want: get_queried_object_id();