
WP Discord Post uses a Discord bot and Webhook URL to write in a channel in a Discord server when a post is published on a blog.
WP Discord Post is a free plugin for WordPress that uses a Discord bot and Webhook URL to write in your desired channel in your Discord server whenever a new post is published on your blog.
You can configure it by going to Settings > WP Discord Post and filling in all the details. The fields are all required. Click on the links “Learn more” in the description of the fields to learn how to get the necessary data.
WP Discord Post is compatible with Contact Form 7, Jetpack Contact Form, and Gravity Forms sending the content of each form to your Discord before it is sent via email as well.
WP Discord Post is also compatible with WooCommerce, sending a new message to Discord every time a new order is created on your shop, or when a new product is added to the catalog.
WP Discord Post supports any post type, with a bit of custom code. If you want to send a message for your custom post type add this code to your functions.php file in wp-content/themes/your-child-theme-name/:
add_action( 'publish_{post_type}', array( WP_Discord_Post::instance()->post, 'send' ), 10, 2 ); Make sure to replace {post_type} with the slug of the post type that you want to use, for example if you registered a post type book you would use:
add_action( 'publish_book', array( WP_Discord_Post::instance()->post, 'send' ), 10, 2 ); This plugin sends private user data to Discord. Different data are sent based on what features you use:
Once the data are sent they are under Discord’s control and the plugin cannot remove them from their servers.
Learn more about Discord’s privacy policy at https://discordapp.com/privacy.
WP Discord Post comes with some hooks that you can use to customize how the plugin works. Here is a list of them:
Filters
wp_discord_post_post_contentwp_discord_post_post_embedwp_discord_post_embed_image_sizewp_discord_post_woocommerce_order_contentwp_discord_post_allowed_order_statuseswp_discord_post_product_embedwp_discord_post_order_embedwp_discord_post_{context}_webhook_urlwp_discord_post_webhook_urlwp_discord_post_request_body_argswp_discord_post_request_argswp_discord_post_process_old_postswp_discord_post_is_new_postwp_discord_post_meme_tagwp_discord_post_meme_ratingwp_discord_post_embed_enabledActions
wp_discord_post_initwp_discord_post_before_requestwp_discord_post_after_request@everyone on each post singularlyAutomatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of WP Discord Post, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
In the search field type “WP Discord Post” and click Search Plugins. Once you’ve found the plugin you can view details about it such as the point release, rating and description. Most importantly of course, you can install it by simply clicking “Install Now”.
The manual installation method involves downloading this plugin and uploading it to your web-server via your favourite FTP application. The WordPress codex contains instructions on how to do this here.
Automatic updates should work like a charm; as always though, ensure you backup your site just in case.
Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of WP Discord Post, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
In the search field type “WP Discord Post” and click Search Plugins. Once you’ve found the plugin you can view details about it such as the point release, rating and description. Most importantly of course, you can install it by simply clicking “Install Now”.
The manual installation method involves downloading this plugin and uploading it to your web-server via your favourite FTP application. The WordPress codex contains instructions on how to do this here.
Automatic updates should work like a charm; as always though, ensure you backup your site just in case.
$post to the filter wp_discord_post_is_new_post.wp_discord_post_embed_enabled.wp_discord_post_allowed_order_statuses.wp_discord_post_{context}_webhook_url and wp_discord_post_webhook_url.full size instead.wp_discord_post_embed_image_size to change the image size if desired.$webhook_url to the filter wp_discord_post_before_request.wp_discord_post_is_new_post instead.wp_discord_post_is_new_post.$post argument from the filter wp_discord_request_args.%post_type% for the message format.@everyone mention which was appearing always before the author name. It now appears at the beginning of the message.$post to the filter wp_discord_request_args." entity from the message sent to Discord with a plain “ (quote symbol). Discord does not convert HTML entities to their respective symbol.wp_discord_request_args to filter the request arguments before to send it to Discord.