card
Used to display posts, employees, products, and other content in cards.
Arguments
- variation
- Style. Eg. vertical (default), horizontal
- title
- Title text
- description
- Description text
- image
- ID of the image
- button
- Arguments for the button components
- post
- Loads default values from post object for href, title, description and image
- show_image
- Default: true
- image_size
- Default: card-image
- show_description
- Default: true
- show_button
- Defaults to true if button is provided
From post
Lorem Ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad…
echo fuse( 'card', array( 'post' => 28 ) );
Horizontal layout
Lorem Ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad…
echo fuse( 'card', array( 'post' => 28, 'variation' => 'horizontal', ) );
Custom content
Hello there
This is how a card works
Les merecho fuse( 'card', array( 'title' => 'Hello there', 'description' => 'This is how a card works', 'image' => 31, 'button' => [ 'label' => 'Les mer', 'href' => 'https://google.com' ] ) );
Horizontal card with author and published date
Lorem Ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad…
echo fuse( 'card', array( 'post' => 28, 'class' => 'unstyled', 'variation' => 'horizontal', 'after_title' => [ fuse( 'byline', [ 'post' => 'inherit', 'parts' => 'Publisert %date%' ]) ], 'after_description' => [ fuse( 'byline', [ 'post' => 'inherit', 'parts' => 'Skrevet av %author%' ]) ], ) );