Craig, this is how I understand your problem:
You will be adding new pages to your website. You need to show on every page how many items are added on your site. At the moment, you edit the
HTML of every page individually to update the number. But you want that update to happen automatically every time you add a new page to the site. If I have got it correct, then plz read my solution.
I could not think of how to automante the entire process. If you follow my solution, each time you add a new page, you will have to update
only 1 character in a file.
Here is the solution:
1. Open your template file and go to H4 tag( Item added) as show below:
2. Replace the text in H4 tag with
<script src="items_added.js"></script> (See below image)
3. Create a file by the name
items_added.js in home directory
4. In that new file(items_added.
js), copy-paste the below code:
Code:
document.write("Items added - #")
# in above code is the no. of items added to the site. So every time you added a new item yo your site, you will have to change this number.(This is the only number you have change,about which I said earlier)
You can format the elements according to your needs.
5. Now upload the .
js file and also make changes to the pages you have already uploaded.
You are done with it!
I use something similar on my site
www.BiologyForMhtcet.com. Did you notice the random quotes(in black color font) just below the header on every page ? They are produced using similar technique, except that functions are a step ahead.