Embed The Peace Almanac On Your Site!

To present the Peace Almanac daily entry on your website as above, and have it update automatically each day, just add the following code to any HTML page. The display will adjust to the width of whatever page or sidebar you include it on, and can be adjusted using CSS.
<script type="text/javascript" src="https://worldbeyondwar.org/js/wbw_peace_almanac.min.js?asdf=jkl"></script><div id="wbw-peace-almanac"></div>

If you have technical questions, please post a comment to this page.

3 Responses

  1. I tried adding the above script to a WordPress sidebar widget, but all that shows up is the script itself. I selected a “code” block for the widget. Any ideas on what I should have done? Thanks!

  2. Alan, please try an HTML widget instead of a code widget. I think a code widget expects PHP code. This is Javascript embedded in HTML (in other words, it’s HTML).

    If this doesn’t work, please comment again and we’ll figure it out. Thanks.


  3. Thanks Marc! In the WordPress editor it works perfectly (after I changed the 6 smartquotes to ascii dumb quotes). At the bottom, the “Today’s full entry” is not a live link, but maybe it isn’t intended to be. However, even though it works fine on preview from the editor, it won’t work from outside the editor when I open our website from the browser (Firefox, up to date I’m pretty sure). Our website was set up about a decade ago and maybe there is some legacy thing that needs to be changed or activated or updated. I should probably holler for help on WordPress. I have the same problem with the counters from nationalpriorities.org. Thanks for your help!

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Articles

Our Theory of Change

How To End War

Move for Peace Challenge
Antiwar Events
Help Us Grow

Small Donors Keep Us Going

If you select to make a recurring contribution of at least $15 per month, you may select a thank-you gift. We thank our recurring donors on our website.

This is your chance to reimagine a world beyond war
WBW Shop
Translate To Any Language