Title: Functions Addition
Last modified: February 5, 2021

---

# Functions Addition

 *  Resolved [eyeofthenyte](https://wordpress.org/support/users/eyeofthenyte/)
 * (@eyeofthenyte)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/functions-addition/)
 * I will preface that I am very new to much of this and have done quite a bit of
   searching.
    Perhaps I’m just goofing something small up or a bunch of small things
   all at once.
 * I am attempting to add a function to the functions.php file for pushing data 
   to a Discord embed. I’ve gotten things with IFTTT to work using webhook.site 
   and I can see the data from the standard webhook output as well. I named the 
   webhook itself **discord-blog-announcement**.
 * I feel like I’m close but so far away. Any suggestions?
 *     ```
       function discord-blog-announcement($post){
       	"content": "Message Here",
         	"embeds": [
           	{
             	"title": "$post['post_title']",
             	"description": "$post['post_excerpt']",
             	"url": "$post[post_permalink]",
             	"color": 5814783,
             	"timestamp": "$post['post_date']",
             	"image": {
               	"url": "$post['post_thumbnailurl']"
             		},
             	"thumbnail": {
               	"url": "$post['post_thumbnailurl']"
             		}
           	}
         	]
       }
       add_action( 'init', 'discord-blog-announcement')
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [eyeofthenyte](https://wordpress.org/support/users/eyeofthenyte/)
 * (@eyeofthenyte)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/functions-addition/#post-14008457)
 * Well, It definitely looks like I merged some things and didn’t quite go far enough
   in other places. I ended up finding some more info and things are working now.

Viewing 1 replies (of 1 total)

The topic ‘Functions Addition’ is closed to new replies.

 * ![](https://ps.w.org/wp-webhooks/assets/icon-256x256.jpg?rev=2656397)
 * [WP Webhooks - Automate repetitive tasks by creating powerful automation workflows directly within WordPress](https://wordpress.org/plugins/wp-webhooks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-webhooks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-webhooks/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-webhooks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-webhooks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-webhooks/reviews/)

## Tags

 * [discord](https://wordpress.org/support/topic-tag/discord/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 1 participant
 * Last reply from: [eyeofthenyte](https://wordpress.org/support/users/eyeofthenyte/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/functions-addition/#post-14008457)
 * Status: resolved