Skip to content

Instantly share code, notes, and snippets.

@Saudumm
Last active September 2, 2023 00:24
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save Saudumm/eb9b04e556a874b508d1aab21aebb545 to your computer and use it in GitHub Desktop.
Save Saudumm/eb9b04e556a874b508d1aab21aebb545 to your computer and use it in GitHub Desktop.
Scriptable Widget for WordPress Sites
Please check out the new script here:
https://gist.github.com/Saudumm/374497679e126cc454af896234f3f5a2
https://github.com/Saudumm/scriptable-News-Widget
@Saudumm
Copy link
Author

Saudumm commented Oct 29, 2020

THIS SCRIPT ISN'T SUPPORTED ANY LONGER

PLEASE CHECK OUT THE NEW SCRIPT: https://gist.github.com/Saudumm/374497679e126cc454af896234f3f5a2

GitHub Repo

Old text:

scriptable-WordPress

iOS Scriptable Widget for WordPress Sites

This script should work for most WordPress sites with a standard REST API.

Changelog

v1.0 - Initial Upload
v1.1 - fixed local date and time display, should now display properly according to your region
v1.2 - widget is now more customizable via parameters, even with custom background images! (see code comments for explanation)
v1.3 - fixed errors regarding urls with special characters
v1.4 - custom widget backgrounds on every widget size and config
v1.5 - massive code cleanup, new descriptions for widget customization
v1.5.1 - fix numeric display of date and time
v1.5.2 - added twitter handle


If someone would like to buy me a coffee 😊: https://ko-fi.com/saudumm


Requirements:

Scriptable for iOS: Link

Config:

  1. add the script to Scriptable
  2. change SITE_URL and SITE_NAME to your preferred WordPress site
  3. create a new widget on your Homescreen and assign the WordPress script
  4. there are multiple parameters at the top of the script that you can change (background colors, gradients, font colors)

You can change the layout and look of the widget. Just long press on the widget and choose "edit widget".

widget-config

Widget parameters

  • example: small|https://www.stadt-bremerhaven.de|Caschys Blog|background.jpg
  • parameter order has to be: widget size, site url, site name, background image
  • parameters have to be separated by |
  • You can omit parameters, for example background image: small|https://www.stadt-bremerhaven.de|Caschys Blog
  • you can just set "small", "medium" or "large" as a parameter
  • parameters that are not set will be set by the standard widget config

Examples:

widget-examples

top left: small widget with standard parameters

top middle: small widget with standard parameters and a custom background image

top right: medium widget with parameter "medium"

middle left: medium widget with standard parameter "small"

bottom left: medium widget with parameter "medium" and a custom background image

bottom right: large widget with parameter "large" and a custom background image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment