Dynamic value for next post inside single layout

I see that there is another post from 2025 regarding using {{ post.permalink({“post”:“next”}) }} not outputting any values inside a single post layout. I’m however using the layout on the default blog type from WordPress itself and it is also not outputting anything. Does this only work inside its own post looper with previous and next context?

I see that the post navigation is working fine, but I’d rather use our own build button component and avoid styling multiple options. Is this a feature or a bug?

Hello @100leiden,

Thanks for writing in! Is the Twig feature enabled in your Theme Options? Try using {{dc:post:permalink post="prev"}} and {{dc:post:permalink post="next"}} in your component.

If this is not working, we would be happy to double-check your site if we can log in. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Yes! Twig is enabled :slight_smile:

{{ post.title }}

{{post.permalink}}

{{ post.permalink({“post”:“next”}) }}

Outputs the title and permalink, but not the next post.

Hey @100leiden,

These are the latest post items:

When viewing the " GEO vs SEO: zo word je zichtbaar in AI zoekmachines", the “{{ post.permalink({“post”:“next”}) }}” will NO longer return anything because you are viewing the most recent post items.

I would recommend that you add an element condition to your button so that it will only display when the {{ post.permalink({"post":"next"}) }} is NOT blank.

The button is working when viewing the 2nd most recent item, by the way.

Moreover, you may need an additional button on the left side to display the previous post link as well.

Hope this makes sense.

Ofcourse, why did I not check other posts in my preview…
Thanks for noticing and the help!

You are most welcome, @100leiden

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.