Content by Country
This is just a temporary page, before I get all the information up.
Name: Content by Country
Requirements: Wordpress 2.0.0 or later
Description: Adds the ability to target post content by a visitor’s country location
Download Link: click here
Installation:
1.) Download the plugin, and unzip the folder
2.) Upload the ‘content-by-country’ folder to your Wordpress plugins directory
3.) Activate the plugin from the admin dashboard
Usage:
A list of all countries and codes are displayed as soon as you activate the plugin. Usage examples are also provided through the Wordpress admin dashboard by going to the Manage ->CBC Content tab.
WordPress Plugin Competition Blog » Content By Country 11:20 pm on June 20, 2008 | #
[...] Content By Country (CBC) enables a blogger to target post content by a user’s IP location, using [cbc][/cbc] tags. Post text can be included or excluded from view to one or more countries at once. [...]
My WTC Plugin Entry: CBC | Simon Emery 11:50 am on June 25, 2008 | #
[...] thought I’d throw in a small entry of my own, which I’ve named Content By Country. It lets a post author display different text (or affiliate links etc) to visitors depending on [...]
Joe 2:14 pm on September 4, 2008 | #
Can this be used for code eg. to display different ads based on a users location?
Simon 6:52 pm on September 18, 2008 | #
Assuming you mean outside the post content itself, it would still be possible I believe. You wouldn’t be able to use the tags, but you could still use the variable that stores the user location.
For example, to show something to a UK user only, you’d use:
< ?php
if($cbc_visitor_location == "UK") {
//code here
}
?>
syowr 8:26 pm on September 24, 2008 | #
I’ve tried using to see if I can use that but it seems to not ever return any value.
Using the [cbc] tags in a post works fine however.
syowr 9:23 pm on September 26, 2008 | #
I’ve tried using the above php and echoing cbc_visitor_location on page seems to not ever return any value.
Using the [cbc] tags in a post works fine however.
(the last post got munged because all the php i posted got stripped out it seems)
Simon 11:41 am on September 29, 2008 | #
Try adding this line above the original code:
global $cbc_visitor_location;