2020-11-23 06:31:22

Related Docs

Do You Need Help or Expertise?

Is editing Source Code not Your Thing? Are you in a tight Time Schedule and need to deliver a fully scalable and safe solution fast to your Clients?

Maybe you want to incorporate the Software found on TukuToi unbranded and royalty free in your Clients Projects after customizing it as per your Projects requirements?

Or eventually you need some training on any WordPress Plugin, Theme or their creation and maintenance?


ShortCode to get and display all Post Data of Child posts, by any possible query argument

The [tws_children] ShortCode can be used to get and display Child Posts of a particular page or post. This ShortCode refers to WordPress’ native Post Relationship which by default is implemented only for WordPress Pages, but this hierarchy can also be enabled on any other post type. In this case the ShortCode will also work with custom post types

The ShortCode can output the results of posts found in different output format (even comma separated list) and it can display different parts of the Post Data.

The real power here is, you can add custom shortcode attributes as long they correspond to the WordPress Post Query. Everything what you can pass to a `get_children()` call of WordPress you can pass to this ShortCode as a attribute=value pair.


  • outputstring [any valid Post Object property]
  • propstring [any valid Post Object property] only used when output is comma-list
  • post_parentint [post ID of which to get children of]
  • post_typestring [the post type if not pages]
  • custom – any valid get_children query argument as ShortCode attribute and value pair.


//Get the count of child posts to 322
[tws_children output="count" post_parent="322"]
//Get a comma separated lists of Post IDs child to 322, and then a comma separated list with Post Titles
[tws_children output="comma-list" prop="ID" post_parent="322"]
[tws_children output="comma-list" prop="post_title" post_parent="322"]
//Get only the first two child posts Post Dates of custom post type products, in a comma list
[tws_children output="comma-list" prop="post_date" post_parent="322" numberposts="2" post_type="product"]