Hi there, so I got single.php that is displaying single posts in some sort of modal in middle of the screen, behind that modal rest of the posts are loaded.
Now on the site I got front-page which is outputting all the posts and categories which is outputting posts associated with that category which is working fine. But I come across the problem when for example post is opened from category page, behind that modal on single.php all the posts are loaded like it’s is visited from the front-page.
I wonder if there is a way to run different query arguments in single.php based on from which link post is visited. If the post is visited from category page I want to query post behind that modal from that category, if it’s visited from the front-page I want it to query posts behind modal like it’s from front-page?
Anyone done something like this?
[ad_2]