Learn more about each Smart action, including description of related WordPress concepts and examples.

WordPress actions add dynamic features to HTML elements.

You can do most of the tasks with Smart actions, listed below. In rare cases where Smart actions don’t suffice, you can use one of 200 regular actions or add custom PHP code to elements.

Block actions

Block actions let you create custom Gutenberg blocks. Regular React-based blocks, dynamic PHP blocks and ACF blocks are supported.

BlockCreate a new custom block. The action should be placed on the main HTML element that represents the block.
Block AttributesDefine and uses one or more editable block attributes on the selected HTML element.
Block Inner ContentDefine the area within the block that can contain other blocks (sub-blocks).
Block ConditionDisplay elements based on block attribute values.

Post actions

Post actions are used to show collections of post and their properties. Post actions can be used only in combination with a parent Show Posts action.

Show PostsShow Posts action loops through a collection of posts. Post smart actions can then be used on and inside the Show Posts element to display post content.
Post TitlePost Title action displays the title of the current post.
Post LinkPost Link action displays the link to the current post.
Post ContentPost Content action displays the content of the current post.
Post ExcerptPost Excerpt action displays the excerpt of the current post. If excerpt is not set, WordPress generates a snippet from the post content.
Post Featured ImagePost Featured Image action shows the featured image of the current post, or the post itself if the post is an image attachment.
Post FieldPost Field action displays one or more post field values on different parts of the element.
Post Tags & CategoriesPost Tags & Categories displays the list of tags, categories or other terms associated with the post. Optionally, it registers a new taxonomy.
Post AuthorPost Author action is used to display information about the post author.
Post DatePost Date displays the date of the current post in the date format set in WordPress options.
Post PaginationPost Pagination enables navigation between pages of Show Posts results, including next and previous results page links and more.

Site actions

Site actions are used to display dynamic features that are not related to posts. These actions can be used anywhere on the page.

Site NameSite Name action displays the website name and optionally, adds a link to the home page.
Site DescriptionSite Description smart action displays the website description.
Site LinkSite Link action adds the link to website home, latest posts archive, individual posts and more.
Site Tags & CategoriesSite Tags & Categories displays the list of all tags, categories or other terms that are defined on the site. Optionally, registers a new taxonomy.
Customizer FieldCustomizer Field displays customized texts and images, sets attributes, styles and more. Optionally, it also registers the customizer control.
Customizer SectionCustomizer Section action registers a new customizer section that contains a group of customizer fields
MenuMenu action displays the navigation menu using the HTML markup of the element.
SidebarSidebar action displays a sidebar. Optionally, it also registers one.
Reusable Template PartReusable Template Part smart action replaces the element with the content of a template part. Optionally, it saves the element and its content as a template part.
FormForm action adds form processing to the enclosed HTML form.
FunctionFunction smart action runs a predefined code snippet or custom code and applies the value to the element.
Don’t ExportUse Don’t export action on placeholder elements that should not be exported to the theme.

Last updated on March 6, 2024 at 3:45 pm

Print this article