Webstuff.Inblighty.Com

Website DIY - tricks and solutions

The CCA goodies extension

The Goodies extension adds much more functionality and flexibility to your CCA plugin. What’s more, the current version is FREE for a tweet about the CCA plugin.

1. Download, Install, and update notifications
Extension Features:
2. Additional Sidebar Options
3. New “Ads/Text in Posts” widgets
4. Associating pages with existing or new categories
plus create widget content for individual posts & pages
5. More shortcodes + option for user defined (shorter) dropdown list of countries
6. National Flag images and flexible shortcode included
7. Allow PHP and shortcodes in widgets
8. Testing: view site as visitor from country xx & widget preview mode


Download / Install / Update


Use at your own risk. You should be using the CCA plugin 0.8.5 or later.

Download plugin extension

[pwt id=’2′]

This version is “free for a tweet”. If you click the download button it will tweet “WordPress users try the free Category Country Aware plugin with the most flexible advanced category widget available. http://bit.ly/1wZcwmS” from your Twitter A/C. Once your tweet has been sent (couple of seconds?) your browser will do a download in the normal manner.

Note: Twitter will prompt you to grant permissions, these are needed for the “download app” to send this tweet. As soon as it is sent, you can revoke these permissions via (Twitter) Settings->Apps. Credits: This page uses the “Pay with a Tweet” plugin.

Upload and activate
Dashboard->Plugins->New->Upload CCA-Goodies-extension.zip. Activate; your CCA Settings form and widgets will now contain the additional options.

Updates and notifications

Eventually I’ll modify the extension to do this; but for the time being I will be tweeting about new versions and issues from my Twitter Account. So it is probably wise to follow my Twitter account (button at the top of the post). It’s also an incentive for me to use Twiiter, I’ve only sent a few tweets and they were back in 2013.


Sidebar Widgets:


  • Option to use a different widget title for a widget entry
  • “Home Page” included in widget category dropdown

Each widget has a preview option (only displayed when logged in as Admin)

 


Text/Adverts in posts widgets:


  • “bottom of post”, “within post” (very flexible choose position by html tags, see above), “shortcode” widgets
  • “Home Page” included in category dropdown
  • preview option

 


CCA categories


  • A page can be associated with a category
  • A post or page can have their own widget entry

Associating a page with an existing category: Open the page in the editor and add a custom field of “cca_category” with the name of an existing category. It must exactly match the category name (“crime fiction” is NOT the same as “Crime Fiction“).

Giving a post or page its own unique widget entry: In the post editor add a cca_category custom field with a unique name. Also create a WordPress category with the same name (this is needed by the plugin to add the name to the choices in the widgets drop-down selector). But, DO NOT link the “post” to this WordPress category; this ensures WordPress treats the category as empty and won’t include it in other widgets used to display category pages.

CCA categories are given priority over WordPress categories. e.g. A post is linked to WordPress Category “Crime Fiction” and also has a custom field “cca_category” of “Junior Fiction“. If a particular widget has an entries for both “categories”, then because it is in the post’s custom field the widget’s “Junior Fiction” content will be used.

 


Country stuff & shortcodes:


  • More geolocation shortcodes (below)
  • Flag images included + shortcode to display any visitor flag at any size.
  • Define a shorter list of countries for your widget’s dropdown country selector
actual text in post visitor from YOUR country sees:
The [cca_flag] shortcode displays the flag of your visitor. You can use the same the attributes as the HTML “img” tag e.g. “[cca_flag width=80px style=”width:80px;vertical-align:middle”].
[cca_flag]
A is [cca_convert miles=80] from B A is 80 miles from B
C is [cca_convert km=100] from D C is 62 miles from D
[cca_country_dropdown] outputs a country list with ISO code values for country selectors. Requires addition of HTML “form” and “select”.
Optional parameters: as demonstrated in the 2nd example. Examples:

<form><select>[cca_country_dropdown]</select></form>
<form><select>[cca_country_dropdown select=”US” short=”yes” class=”bgyellow”]</select></form>

You can create your shorter country list via CCA Settings form. The shorter list can be used in the country selector on both your sidebar and post widget setting forms.

 


Visitor Flags


See above for use of flag shortcode

Use flag images included with this extension (from Go Squared Ltd and commercial use is permitted – see license in extension zip), or use the setting to specify another set of installed flags to be used by the shortcode.

 


Allow PHP and shortcodes in widgets


Note as with other WP plugins “eval” will be used to run your PHP, this is considered a security risk by most pundits.

 


Testing:


  • Each widget has preview option (widget will only be visible to someone logged in as admin)
  • View site (CCA content) as if you are a visitor from selected country (when logged in as admin)

 

 


2 Comments

  1. Bryan

    Looks like a great plugin but I need to change content on the page according to the location of the visitor and specifically by their postcode. My visitors are mostly from my country, Australia, so I want someone from a suburb in Brisbane to see content on the page that refers to their suburb. For example, “Digital Marketing in Bowen Hills”, for Bowen Hills visitors and “Digital Marketing in Yeronga” for Yeronga visitors and so on. Is there an extension or trick to getting this to work? Thank you

    • AW

      Sorry plugin (and any extension) are at country level only. I’m not aware of any plugin that will do this. There may be API/JS client side solutions or maybe someone (not me) could write a custom server side solution possibly using Geolite City and/or Geonames data http://download.geonames.org/export/zip/

Leave a Reply to Bryan Cancel reply

Your comment will appear after its approved; usually within 12 hours but can be up to a week.
Email is optional and never published. It will only be used to contact you if clarification of your comment is needed.

Copyright © 2015-2024 Webstuff.Inblighty.Com
This site recommends and is hosted by: Kualo Web Hosting.    
Theme: hemingway
 

Blog home  |  ↑ Top of Page ↑