I’ve a question about filtering pages by a custom field. I’ve made a custom select field with a list of countries. What I’m trying to do is showing some pages only in specific countries. For example, if on a page the custom select field “France” is selected, I would like to show this page only if a person enters the site from France. I can figure out how to get this variable from the users side, but I can’t figure out if it’s possible to filter the pages before showing up in the frontend by a custom field, maybe with a specific function inside functions.php?
Hopefully somebody knows how to do this. Thank you in advance!
Kind regards, Robin
- The topic ‘Filter pages by custom field’ is closed to new replies.