Shortcodes Syntax - Carousel

Apr 27, 2023 By Homecat

Carousel is a useful shortcode in theme Walden, Used to display multiple images with their information.


1{{< carousel src="carousel_sample" >}}


Shortcode carousel extracts data file from the built-in directory data, here is an example of a data file.

 2    "total": "4",
 3    "cover": "",
 4    "item": [
 5        { 
 6            "id": "1",
 7            "title": "Liberary of Shanghai Jiaotong University", 
 8            "description": "The old library was completed in October 1919. It has both the Romanesque Corinthian order style and the detailed sculpture and contrast color of Baroque architecture. When I was studying in school, this was a library for social sciences, and now it is used as an exhibition hall and archives for school history.",
 9            "url": "",
10            "memo": "© Homecat / Genway"
11        },
12        { 
13            "id": "2",
14            "title": "Aida", 
15            "description": "Aida’s Synopsis. Split into four acts, Verdi’s Aida opera is a story of heartbreak and betrayal. Set in the midst of a war between Egypt and Ethiopia, this moving and timelessly tragic love story centres on the ill-fated and forbidden romance of Aida and Radamès. In Aida, Verdi created rich and captivating characters.",
16            "url": "",
17            "memo": "Homecat"
18        },
19        { 
20            "id": "3",
21            "title": "South Padre Island, Texas, USA", 
22            "description": "South Padre Island is located a few miles off the coast of the Gulf of Mexico in Texas and is the largest and longest barrier island in the state. Barrier islands like South Padre Island are usually parallel to the coast and serve as the first line of defense for the continent against storms. South Padre Island is connected to the mainland through a bridge, and every year thousands of tourists come to the island to swim, row, fish, fly kites, or lie comfortably on the beach basking in the sun. In addition, there are various exquisite sand castles distributed on the island, which are eye-catching and created by artists from around the world.",
23            "url": "",
24            "memo": "© Jeff R Clow / Getty Images"
25        },
26        { 
27            "id": "4",
28            "title": "Walden", 
29            "description": "Walden is the record of the American writer Thoreau who lived alone on the bank of Walden Lake, describing what he saw, heard and thought for more than two years. The book advocates simple life, loves the scenery of nature, has rich content, profound significance, and vivid language.",
30            "url": "",
31            "memo": "©"
32        }
33    ]
34 }