Cookies help us deliver our services. By using our services, you agree to our use of cookies. More information

Shortcodes

From Forum Freie Lastenräder

Shortcodes

Commons Booking bietet 2 shortcodes:

  • cb_items (Liste der Artikel)
  • cb_item_categories (Liste der Artikel-Kategorien) - ab Version 0.9


Nitzung

Artikel-Liste

In a Wordpress editor field, enter the following to show all items, sorted alphabetically by title

[cb_items] 

Shortcode usage example.PNG


Kategorien-Liste

[cb_item_categories] 



Artikel-Liste - Parameter

The parameters are a subset of the wordpress WP_QUERY params.

p: item id

Get one single item by item id

[cb_items p=17] 

(How to find the item id: Edit the item and look at the URL: "?post=17&action=edit )

cat: category id

Get all items from a category

[cb_items cat=4] 

orderby: set sort order

title, date, rand, menu_order

[cb_items orderby=title]