Simple Crypto Shortcodes – WordPress Plugin
Welcome to the official page of the Simple Crypto Shortcodes WP Plugin.
The purpose of this WordPress plugin is rather simple- to provide you with easy shortcodes that you can use to display various cryptocurrency data on your own website.
The plugin is getting the latest cryptocurrency data from CoinMarketCap, a leader in crypto data monitoring.
At the moment of this writing, CoinMarketCap provides financial and other coin metrics for as much as 11,711 coins.
With this plugin, some of that data is available at your fingertips, and all you need is to get the CoinMarketCap API key, after which you will be able to access some of their data via simple shortcodes.
The plugin provides a total of 13 shortcodes, all of which can be used to access and present various coin metrics.
These shortcodes can be used to display a coin price, volume, and supply among other data.
Simple Crypto Shortcodes – How to use them?
First things first, once you install and activate this plugin, you need to go to its settings.
You can do so by going to your WP dashboard and clicking the “Simple Crypto Shortcodes” menu item:
Depending on your WordPress setup and the plugins/theme utilized, the menu item for Crypto Prices could be somewhere else in the dashboard menu, but the item name and icon will always be the same.
If you have already installed and activated the plugin, but have a hard time locating it in the menu, you can also access it directly via URL:
Once you are inside the plugin settings, there is just one thing to be done- entering the CoinMarketCap API key.
There is a cost associated with it if you’re having a large site that needs lots of data pulled often, but there’s also a free package that offers you up to 333 requests per day and 10.000 requests per month.
To register for a free API key(or some higher tier), go here.
Once you register and log in, you should be presented with a screen like this:
Click the blue “COPY KEY” button, and then paste that key into the plugin settings:
After the steps from above, simply click the blue button saying “Save your API key” and you should be all set!
From this point on, you can use various shortcodes for crypto data, that you can display in your posts, pages, widgets, and even themes or plugins.
Crypto Data Caching – How to preserve your API quota
Whether you need this set-up or not heavily depends on how many visitors your site has over 24 hours, as well how many coins data you need to be displayed and your CoinMarketCap tier.
Remember- a free CoinMarketCap tier offers up to 333 requests per day. If you want to show real-time data without caching, this means you can do it up to 333 times per day for one coin. If you need to display data of 10 coins, then you can do it only 33 times per day.
This is where caching comes in handy.
By setting up a higher caching time within the plugin, you reduce the number of requests that this plugin has to make to CoinMarketCap API.
If set to 600 seconds(or left empty as this is the default), this means that the plugin will contact CMC API every 10 minutes.
Thus, over 24 hours, it won’t make more than 6 * 24 = 144 requests per coin.
In this case, you can display data of up to two coins to an unlimited number of users per 24 hours.
If set to 3600 seconds(1 hour), the plugin will make up to 24 requests per day per coin, meaning you can show up to 13 coins data to an unlimited amount of users.
Set it to one day(86400), and you will be able to show data of up to 333 coins to an unlimited amount of users!
So, the more coins data you need, the higher caching time should be used. Most people don’t need the data updated very often, and it should work for them over higher time frames.
However, if you have a site that has a need for showing real-time data, consider going with a higher tier package of the CoinMarketCap API.
To change the caching time of this plugin, simply go to the plugin settings and add a desired number of seconds, then hit the “Save caching time” button:
A list of shortcodes and how to use them
As mentioned before, there is a total of 13 shortcodes at this moment, that you can use to display various coin metrics.
For each shortcode, the syntax is very simple and similar, there’s a shortcode name(briefly describing what the plugin will output), along with the parameter symbol, which decides which coin data to pull from.
The symbol parameter is mandatory, as the plugin needs to know which coin data you need.
If you omit the symbol parameter, the shortcode won’t work.
That said, any coin symbol available on CoinMarketCap will work and display accordingly. For the sake of this tutorial, I’ll be using “BTC”, but you can use any other coin symbol that’s available on CoinMarketCap, for example, “ETH”, “XRP”, “SOL”, “CHZ” or any other of 11k plus cryptocurrencies!
Here’s a list of all the possible shortcodes, and how to use them:
Coin Max Supply:
Coin Circulating Supply:
Coin Volume 24h:
Coin Market Cap:
Coin Market Cap Dominance:
Frequently asked questions about the Simple Crypto Shortcodes plugin:
The plugin should be rather simple to use- you register for the API key and enter it into the plugin settings, then afterward you use the shortcodes wherever you need the data displayed.
However, here are some of the more technical answers to questions by advanced users:
Why these shortcodes don’t work in my widgets?
This depends on your theme and plugin configuration.
Some themes and plugins allow shortcodes inside widgets while others don’t.
If you’re unlucky, and your theme doesn’t support shortcodes inside widgets- there’s an easy fix for it:
First of all, check if your widget is a “Text widget”, as it should support the shortcodes by default.
If it’s a “Text widget” but doesn’t work, or you’re using a “Custom HTML” widget, try adding this to your functions.php file:
add_filter( 'widget_text', 'do_shortcode' );
How to use the Simple Crypto Shortcodes inside theme and plugin files?
Sometimes, you may need to add a shortcode inside your theme or plugin. This is most likely done when you need to add the shortcode outside the posts or page editor or widget area(in the header, footer, below or above posts, etc).
In that case, you just need to use the “do_shortcode” PHP function. For example, to add a shortcode inside your theme, choose the right place for your shortcode and add this code:
<?php echo do_shortcode('[coin_price symbol="BTC"]'); ?>
Hopefully, you find this plugin easy to use and useful for your needs.
If that’s the case, feel free to leave a rating on WordPress.org, and also share it with your friends- it’s a free plugin after all :)
However, if you have problems using it, please don’t leave a negative rating right away.
First, try reading the manual from above.
If that doesn’t help, feel free to write a question via WP support forums or leave us a message here.