Is it theoretically possible to have the following feature?
Each post has a country code. When a visitor comes in, the system will determine the visitor's country code. Then when the page renders, only the post with that country code is displayed. This need to also affect the widgets/site search etc.
I was asked to evaluate this. I think this would lead to if statements all over the place, in the loop, and I need to modify the widgets too. All in all I think it is doable but is difficult and make the whole code-base unmaintainable. However I want to get some insight to this, since I only have experience in themes, not plugin development.
Also I am not sure how to tag this more appropriately. Any suggestion is welcomed.
I took a look at the 'Country Filter' plugin, it's nice but does filtering in the content level not the post level. I am also looking at
add_filter(request,...) to see if this can be done at the root.