  {"id":3560,"date":"2024-12-11T15:56:00","date_gmt":"2024-12-11T20:56:00","guid":{"rendered":"https:\/\/www.montclair.edu\/university-communications\/?page_id=3560"},"modified":"2024-12-11T15:56:00","modified_gmt":"2024-12-11T20:56:00","slug":"before-and-after","status":"publish","type":"page","link":"https:\/\/www.montclair.edu\/university-communications\/web-development-and-experience\/montclair-edu-website-framework\/wordpress-shortcodes\/before-and-after\/","title":{"rendered":"Before and After"},"content":{"rendered":"<p>The <strong>beforeandafter<\/strong> shortcode will allow you to display two images with a slider between them. The visitor can move the slider back and forth to switch between the before and after images.<\/p>\n<h2>Example<\/h2>\n<div class=\"before-and-after wide\"><img decoding=\"async\" src=\"\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/kasser-day.jpg\" alt=\"Kasser Theater in the day\" \/><img decoding=\"async\" src=\"\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/kasser-night.jpg\" alt=\"Kasser Theater at night\" \/><\/div>\n<h2>Attributes<\/h2>\n<table class=\"responsive-table\">\n<thead>\n<tr>\n<th scope=\"col\">Name<\/th>\n<th scope=\"col\">Possible Values<\/th>\n<th scope=\"col\">Required<\/th>\n<th scope=\"col\">Notes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>class<\/td>\n<td><strong>wide<\/strong> or <strong>square<\/strong><\/td>\n<td>No<\/td>\n<td>Configures the shape of the image<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Image Sizing<\/h2>\n<p>The <strong>beforeandafter<\/strong> shortcode will display images based on the class name you provide. Using the <strong>square<\/strong> class will create a 1:1 image, <strong>wide <\/strong>will create a 16:9 image, and leaving class blank will create a 4:3 image.<\/p>\n<h3>Recommended Image Sizes<\/h3>\n<dl class=\"compact\">\n<dt>Default Aspect<\/dt>\n<dd>2000&#215;1500<\/dd>\n<dt>Wide Aspect<\/dt>\n<dd>1920&#215;1080<\/dd>\n<dt>Square Aspect<\/dt>\n<dd>1500&#215;1500<\/dd>\n<\/dl>\n<h2>Code Sample<\/h2>\n<p>To use the before and after shortcode, copy and paste the sample below:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n\r\n&#x5B;&#x5B;beforeandafter class=&quot;wide&quot;]\r\n&lt;img src=&quot;http:\/\/www.montclair.edu\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/kasser-day-1024x576.jpg&quot; alt=&quot;Kasser Theater in the day&quot; width=&quot;1024&quot; height=&quot;576&quot; class=&quot;alignnone size-large wp-image-3638&quot; \/&gt;&lt;img src=&quot;http:\/\/www.montclair.edu\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/kasser-night-1024x576.jpg&quot; alt=&quot;Kasser Theater at night&quot; width=&quot;1024&quot; height=&quot;576&quot; class=&quot;alignnone size-large wp-image-3639&quot; \/&gt;\r\n&#x5B;\/beforeandafter]]\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The beforeandafter shortcode will allow you to display two images with a slider between them. The visitor can move the slider back and forth to switch between the before and after images. Example Attributes Name Possible Values Required Notes class wide or square No Configures the shape of the image Image Sizing The beforeandafter shortcode [&hellip;]<\/p>\n","protected":false},"author":411,"featured_media":3554,"parent":3552,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-3560","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/comments?post=3560"}],"version-history":[{"count":4,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3560\/revisions"}],"predecessor-version":[{"id":3656,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3560\/revisions\/3656"}],"up":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/media\/3554"}],"wp:attachment":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/media?parent=3560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}