Discord VSK News Post
Plugin for WordPress website to make a discord post when news are posted.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/martinorell/wordpressnewsposttodiscord/archive/refs/heads/master.zipThis is a plugin used on the Västerås Chess Club Website to publish news in the discord server whenever a news post is posted on the website. Only those with a specific role on the server will receive a notification. The plugin should work for other websites using WordPress too.
With this plugin an admin can set a discord webhook in Settings->General. He can also set a discord role, so those with that role gets a notification on discord.
You can see how to create a webhook on the discord server here: https://www.geeksforgeeks.org/websites-apps/how-to-make-a-webhook-in-discord/
When setting Discord role, you need to use the Id of that role. This can be accessed by right clicking on a role in discord and copy Role ID.
This code is inspired by code written by Matt Weber https://badecho.com/index.php/2020/10/20/automatically-posting-wordpress-posts-to-discord/