As WordPress developers, probably software developers in general we sometimes miss the simple use cases for our products. We have developed our stock market plugin for WordPress for a number of years now. We have added functionality to show charts, scrolling tickers in sidebars and a lot more.
However sometimes the need is more simple.
Public companies (i.e. those listed on a stock exchange) often want or need to show their current share price on their website. It does not need to be bouncing around, scrolling here of there, just a simply display the current price for visitors.
Today, I’m going to step through a quick tutorial that shows you how to do just that.
What is required?
This all depends on your website running WordPress. The only other thing you need is our plugin WP Stock Ticker. I’m going to assume you’ve installed the plugin, if you need help on that part you can review the documentation here.
Static display versus scrolling
As the name suggests, the plugin’s primary focus was to create a scrolling ticker. As displayed in the screenshot below.
That’s what we’re referring to when we talk about scrolling.
It’s not really what you need in this situation. Instead what you’re probably looking for is to display the current share price for one specific stock, your company’s.
Setup your share price in the plugin
In your WordPress dashboard, click Settings and choose WP Stock Ticker from that menu.
You will then see the plugin’s setting page. From here select the Static Display tab.
Now I’m sure that you know your company’s ticker symbol 🙂 If you don’t you can jump over to Yahoo! Finance and search for it.
If you were IBM for example, your ticker symbol is ibm. In the Static Display tab, click add stock and then enter your symbol. It should look a little like the screenshot below.
In the field Ticker Name you can enter the company name as you would like it displayed, you could even enter something like ‘Our current share price’.
Hit save on this interface when you’re ready.
Display the price in a WordPress widget
The plugin supports WordPress’ widget system. More often than not this will be how you display the share price in your website. It could be a sidebar widget, a footer widget, it depends on the widget areas your theme has available and of course where you would like it to be displayed.
The plugin provides two widgets, the one you’re looking for is called WP Stock Ticker Pro Static. Here I’m going to place it into the Primary Sidebar widget area.
Once you have that in place you should see something like this.
And, you’re done!
Visit your website now and you will see the share price displayed.
Similar use cases
The static display of stock price data is straight forward to do. You can use the same idea to show other information in a similar fashion. Let’s say your business or website content revolves around the gold price, the oil price, a currency pair. You could follow the same outline as we have here, the difference would be that you might use a commodity price or a currency pair instead of a company’s ticker symbol.
Hope you enjoyed the tutorial, if you have a question post a comment below.
Leave a Reply