onPostPinned( )


A backend event that fires when a forum post is pinned.

The onPostPinned() event handler runs when an existing forum post in your site is pinned. Only forum admins can pin posts. The received PinnedPost object contains information about the post that was pinned.

Note: Backend events are not fired when previewing your site.

Method Declaration
Copy
function onPostPinned(event: PinnedPost): void;
Method Parameters
eventPinnedPostRequired

Information about the forum post that was pinned.

A backend event that occurs when a forum post is pinned
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onPostPinned(event) { const pinnedPostId = event.postId; console.log("Post pinned"); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?