Function gets wrong ID of posts
-
Hi. Can you help me please and tell what i’m doing wrong?
There is a function ub_releted_post_by_shop() (https://pastebin.com/7WcBCcyq) that returns a list of posts from blog, this posts have the same taxonomy as the current post type
If I call this function inside single post then everything is fine, I ‘ve got needed posts.
But when I’m on the homepage or in archive then this function returns wrong posts (not by taxonomy terms)
Frontpage is formed by index.php that has some templates for different post types (https://pastebin.com/Xbc0QZvU).
Why function (code) returns wrong posts on homepage?
Thanks for advices.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Function gets wrong ID of posts’ is closed to new replies.