[content_box]

The shortcode creates flexible content boxes with various media types, titles, descriptions, and call-to-action buttons.


Product


Shortcode Attributes

There are a number of shortcode attributes available which you can use to customize the output.

Content

  1. title – The title displayed in the content box

Link/Button

  1. link_type – Determines how the link is displayed
    • Default: button.
    • Options: button, box, text, none. Specify one only.
  2. button_target – Determines the link target type.
    • Default: link.
    • Options: link, modal. Specify one only.
  3. button_title – Text for the button/link.
    • Default: View.
    • Options: Any text value.
  4. modal_data_open – Modal ID to open (when button_target="modal").
    • Options: Any numeric value.
  5. link_url – URL for the link (when button_target="link").
    • Options: Any URL.
  6. link_target – HTML target attribute for the link.
    • Options: _blank, _self, _parent, _top. Specify one only.

Media

  1. media – Type of media to display.
    • Default: image.
    • Options: image, gallery, video. Specify one only.
  2. image – Image URL or WordPress attachment ID.
    • Options: Any numeric value or URL.
  3. image_icon – Display image as icon.
    • Default: off.
    • Options: on, off. Specify one only.
  4. icon – Icon class or URL (used when image_icon="on").
    • Options: Any URL. Font Awesome HTML if image icon is off.
  5. gallery – List of image URLs or attachment IDs.
    • Options: Any numeric value or URL. Use commas , to separate.
  6. lightbox – Enable lightbox for gallery.
    • Default: off.
    • Options: on, off. Specify one only.
  7. video – Accept Youtube or Vimeo video URL only.
    • Options: Any URL.

Advanced

  1. classes – Additional CSS classes for the content box.
  2. id – Custom ID attribute for the element.

Shortcode Enclosed Content

Any content placed between [content_box] and [/content_box] will be used as a template, where {content} acts as a placeholder for the content box.


Example Usage

[content_box  title="Our Services" image="123" button_title="Learn More" link_url="/services"]Lorem ipsum dolor sit amet...[/content_box]
[content_box title="Photo Gallery" media="gallery" gallery="123,456,789" lightbox="on"]Browse our collection of images[/content_box]
[content_box title="Watch Tutorial" media="video" video="https://youtube.com/watch?v=example"]Learn how to use our product[/content_box]

Results

Example 1:
This example displays a content box titled “Our Services” with an image (ID 123), descriptive text “Lorem ipsum dolor sit amet…”, and a “Learn More” button linking to /services.

Example 2:
This example displays an interactive photo gallery content box titled “Photo Gallery” displaying images with IDs 123, 456, and 789 in a lightbox, accompanied by the text “Browse our collection of images”.

Example 3:
This example displays a video content box titled “Watch Tutorial” that embeds a YouTube video from the specified URL and displays the accompanying text “Learn how to use our product”.
The shortcode automatically applies WordPress content filters to process any HTML or other shortcodes within the content.