esc_sql() | Escapes data for use in a MySQL query. Protects against SQL injections. May accept an array of strings for processing. |
get_boundary_post() | Retrieves the first or last post of the site (by publish date). |
get_children() | Retrieve all children (attachments, revisions, or sub-pages) of the post parent ID. It works similar to get_posts(). |
get_page_by_title() | Retrieve any type of post (page, post, custom type) by given title. |
get_pages() | Retrieve pages data (or hierarchical post type data) as an array of posts objects. Caches the result in object cache. |
get_posts() | Retrieve list of latest posts or posts matching criteria. |
get_queried_object() | Retrieve the currently-queried object. |
get_queried_object_id() | Retrieve ID of the current queried object. |
get_query_var() | Retrieve variable in the WP_Query class. |
have_posts() | Checks if the current WP query has results for output, i.e. if there are posts available for output on the current page. Conditional tag. |
query_posts() | Sets up The Loop with query parameters. |
rewind_posts() | Rewind the loop posts. |
setup_postdata() | Set up the global post data. Useful for easy usage of Template Tags related to the design of the post: the_title(), the_permalink(), etc. |
wp() | Set up the WordPress query. |
wp_get_recent_posts() | Retrieve the last posts of the website, including drafts, scheduled, and posts on moderation. Gets the last 10 posts only. |
WP_Query{} | The WordPress Query class. Selects posts from the database based on the specified parameters. get_posts(), query_posts() and all other query functions for posts selection from wp_posts table are based on this class. |
wp_reset_query() | Invalidates (destroys) the data of the last query created for use in an arbitrary WordPress Loop and restores the default loop data. |
wp_reset_vars() | Resets global variables based on $_GET and $_POST |