Primary

Post Types and Archives

Post Types

Widgets Control Pro provides display conditions based on the viewed post type. You can display or hide a widget or sidebar by post type using the following token:

  • [type:xyz] – Use this to show or hide a widget or sidebar for a specific post type. Indicate the post type’s key.

For example, to show a widget only on Pages (i.e. based on WordPress’ built-in Page post type), use the Visibility option Show only on these pages and indicate [type:page] in the Conditions.

You can select one or more post types separated by comma. For example, the following condition can be used to refer to Posts and Products.

  • [type:post,product]

You can also indicate one or more entries, each on a line by itself. The above example could also be indicated like this:

  • [type:post]
    [type:product]

Archives

Show or hide widgets for archive pages or archive pages of a specific post type using these tokens:

  • [archive] – Any archive page.
  • [archive:xyz] – An archive page of a specific post type. Indicate the post type’s key.

For example, [archive:product] can be used to show widgets or sidebars for the WooCommerce shop page and product archives only.

You can select one or more archives for post types separated by comma. For example, to show or hide a widget on post, product and event archives, use:

  • [archive:post,product,event]