Delete wordpress post

From UBot Studio
Revision as of 02:56, 3 July 2023 by LillyT (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

delete wordpress post command deletes a specified post or page from a WordPress website.

The post or page is specified by its ID. Make sure to correctly specify the ID, as this action is irreversible.

Parameters

Post ID: The ID of the post or page you want to delete.

Example

setup wordpress connection("https://yourwordpresssite.com", "username", "password")
create wordpress post("My New Blog Post", "This is the content of my new blog post.", "public", "post", #my post id)
#prints the post id in console
ui console view
print(#my post id)
#deletes the post
delete wordpress post(#my post id)

This script will create a new public post with the title "My New Blog Post" and the content "This is the content of my new blog post." on your WordPress website. After the post is created, it will store the post's ID in the #my post id variable, print the post ID in the console, and then delete that post.

Remember to replace "https://yourwordpresssite.com", "username", and "password" with your WordPress site's URL, your username, and your password, respectively. Replace "My New Blog Post" and "This is the content of my new blog post." with your own title and content.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox