Menu

Install

Daily Palindrome Widget

It’s easy to have the Daily Palindrome on your website or blog. Whether you use Wordpress, another platform, or built it yourself, it all starts with a small code snippet. You can see the widget in action along with suggestions on adding it to WordPress sites at Franklin's Palindromedary.

The Daily Palindrome widget fits any page. The supplied container div is styled to expand to 100% of the parent container. Wherever you drop the widget, code, it will expand to fit that space. It looks best in blocks that are less than 100% of the screen width on large screens. On small screens like mobile devices, a full-width block works best.

The palindrome changes every day, two minutes after midnight in Denver. It draws from a large collection by anonymous palindromists and a growing body of original work by contemporary writers. The newer palindromes all come from members of Franklin's Palindromedary who use the Palindromedary reference and Palindrome Composer in their writing.

Widget Code

The widget code has two lines of HTML script tags. The first line loads jQuery. If your site already uses jQuery, you can probably remove the first line. It does not hurt anything to leave it in. Test it both ways to be sure.

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://palindromedary.us/js/potd.js" id="potd-pal-widget"></script>

Add Widget To WordPress Site

The easiest way to get the Daily Palindrome on your WP site is to paste the code snippet directly into the content using the block editor. Just edit the page or post and add a new block. Select the HTML block type and paste the code into the block. The image below shows the result.

Wordpress block editor, select HTML, enter snippet

Then click the Preview button to see the current palindrome. Easy and done.

Change selection to Preview

Once saved and published, your page will display the Daily Palindrome, updating once per day. Thank you for using this feature.

Project Members: