Just another post

Just another post

Hello,

I have made a CPT named ‘Questions’ with a custom taxonomy named ‘Theme’ with CPTUI
They are just the same as basic posts but a different name.
For each theme there is a Archive template and for each Question a single post template made with elementor. I have on that single post template a post navigation widget setup with:
In terms: Questions
Questions taxonomy: Themes

I have in a theme for example 12 questions. When i click on next on a question in that theme I can do that 4 times and then it only says previous. so from the 12 questions i can only click next 3 or 4 times?

Is this a bug? or how can i fix this issue?

Steps to reproduce

  1. Create a CPT with custom taxonomy.
  2. Create 10 posts for that CPT all in 1 taxonomy.
  3. Test the previous & next widget setup for that CPT & taxonomy

Isolating the problem

  •  This bug happens with only Elementor plugin active (and Elementor Pro).
  •  This bug happens with a default WordPress theme active.
  •  I can reproduce this bug consistently using the steps above.
@bainternet
Contributor

@Webtica

We can’t replicate, and it seems to work just fine. Our post navigation widget calls WordPress native next_post_link and previous_post_link

So the value returned by it could be filtered by one of the inner filters of get_adjacent_post or something else in your setup.

thanks.

@knauso

I have the very same issue, some posts are omitted from previous/next posts.
I cannot get the logic why some posts are not showing.

@sprywebtech

I have exact same problem too. Post navigation not working correctly for custom post types. I have set “In same term” setting to my custom post type and selected taxonomy to be categories. All my posts in the CPT have the same category. They should be cycling through all of them but It only does about 5 and they are not all the same. Depends on what post I start with as to which five it will show, and it doesn’t go in order either. They just seem random. Anyone figure out a fix for this?

@cipriantepes

That’s right. On a custom post type, it jumps posts, it doesn’t follow any order.

Please help!

@sprywebtech
sprywebtech commented on Aug 24, 2022 via email