Get wordpress posts

From UBot Studio
Jump to: navigation, search

$find wordpress posts by type is a function that retrieves all posts of specific type from a WordPress site.

This function will return a list of all posts of the specific type as a string format including the post IDs, titles, and content.

Parameters

Post Type: The type of the posts you want to retrieve. Options include "post" (for blog posts) and "page" (for static pages). You can also manually enter any custom post type. Default is "post".

Return Value

This function returns a yaml object which contains a list of all posts of the chosen type, including their IDs, titles, and contents.

Example

connect to wordpress("https://yourwordpresssite.com", "username", "password")
log object($find wordpress posts by type("post"))

This script connects to your WordPress website and retrieves and prints all posts of type "post".

Remember to replace "https://yourwordpresssite.com", "username", and "password" with your WordPress site's URL, your username, and your password, respectively. Adjust "post" to the type of posts you want to retrieve.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox