My apologies if this question has already been asked somewhere else, I searched but couldn't find anything. I am working on a tours website, there will be individual package pages that show some text, images and some other stuff.
On the right hand side of my single package pages I have a comparison table which is merely a custom WP_Query pulling out all packages from the database using the following code:
// Package fetching arguments $pargs = array( "numberposts" => -1, "post_status" => "publish", "post_type" => "packages", ); // Get out packages $cpackages = new WP_Query($pargs);
I however would like the first item of this comparison table to be the current package the visitor is viewing. Say for example the user is viewing a package called "Tour A" on the right hand side I would like to pull out all packages but make sure that Tour A is at the beginning and highlighted then the other posts displayed.
I've looked into sticky posts, but they don't really apply to what I am wanting to do, because if someone is on Tour B, then it needs to be displayed first in the comparison table and then so on.