> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: onPostDeleted(event: PostDeleted) # Method package: wixBlogBackend # Method menu location: wixBlogBackend --> onPostDeleted # Method Link: https://dev.wix.com/docs/velo/apis/wix-blog-backend/events/on-post-deleted.md # Method Description: An event that is triggered when a post is deleted. The `onPostDeleted()` event handler runs when a post is deleted. The received `PostDeleted` object contains event metadata. >**Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event that occurs when a blog post is deleted ```javascript // Place this code in the events.js file // of your site's Backend section. // Add the file if it doesn't exist. export function wixBlog_onPostDeleted(event) { const deletedPostId = event.metadata.entityId; console.log('Post deleted', event); } /* Full event object: * { * "metadata":{ * "id":"416ba1ea-b7a0-432d-9a65-a8b5b0b2208c", * "entityId":"ecec1fb1-d21a-4bf8-9e01-c6e4f231ae67", * "eventTime":"2022-06-16T14:21:40.065Z", * "triggeredByAnonymizeRequest":false * } * } */ ``` ---