Great idea. I will add it when I run idle, which probably isn’t going to be the next month or so. I’d use a more specific class like “geoip-country-UK” or so.
If you want to implement it yourself, you will need to use the filter body_class, see https://codex.ww.wp.xz.cn/Function_Reference/body_class#Add_Classes_By_Filters for an example.
Awesome ! I will be waiting for your next update…by the way is there any way we can get notified via email when updates are released? A mailing list?
cheers
1.6 will be out today! There are 2 new classes when enabled on the plugin page:
geoip-country-UK and geoip-continent-EU
So you can target your content via CSS:
.show-only-in-europe { display:none; }
body.geoip-continent-EU .show-only-in-europe { display:block; }
HTML:
<div class=”show-only-in-europe”></div>
please tell me how to use this function for targeting US users. I tried using this code for CSS
.show-only-in-US { display:none; }
body.geoip-country-US .show-only-in-US { display:block; }
HTML:
<div class=”show-only-in-US”></div>
but it didn’t worked
You can try with !important. Is the CSS class present and correct (check by looking at the HTML code.)? You need to enable it on the plugin “Tools” page.
@steliodj :
No there is no mailinglist but you can subscribe to my SVN commits (Plugin Tab Developers) – I only commit when releasing a new version as the development happens @ github.