  {"id":3562,"date":"2024-12-11T15:56:00","date_gmt":"2024-12-11T20:56:00","guid":{"rendered":"https:\/\/www.montclair.edu\/university-communications\/?page_id=3562"},"modified":"2024-12-11T15:56:00","modified_gmt":"2024-12-11T20:56:00","slug":"buttons","status":"publish","type":"page","link":"https:\/\/www.montclair.edu\/university-communications\/web-development-and-experience\/montclair-edu-website-framework\/wordpress-shortcodes\/buttons\/","title":{"rendered":"Buttons"},"content":{"rendered":"<p>Adding buttons to your website is a great way to draw attention to important calls to action for site visitors.<\/p>\n<p>To add buttons to your content, use the <strong>button<\/strong> shortcode, which converts basic links into buttons. Buttons on montclair.edu can be displayed in different styles. To change the appearance of a button, use the <strong>class<\/strong> attribute. More details on styling of buttons and sample code are below.<\/p>\n<h2>Button Colors<\/h2>\n<p>When your button is on a white or light-colored background, use the default or &#8220;ghost-red&#8221; button styles.<br \/>\n<div class=\"prpl-row\"><div class=\"prpl-column one-third\"><br \/>\n<span class=\"prpl-button\"><a href=\"#\">Default Appearance<\/a><\/span><br \/>\n<\/div><div class=\"prpl-column two-thirds\"><br \/>\n<strong>Red background with white label text<\/strong><br \/>\nThis is the default look of a button. Best for use on white or light backgrounds. No button class specified.<br \/>\n<\/div><\/div><br \/>\nTo make the button shown above, triple click the code below to select, then copy and paste into the text editor on your WordPress page:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;&#x5B;button]&lt;a href=&quot;URL goes here&quot;&gt;Button copy goes here&lt;\/a&gt;&#x5B;\/button]]\r\n<\/pre>\n<div class=\"prpl-row\"><div class=\"prpl-column one-third\"><br \/>\n<span class=\"prpl-button ghost-red\"><a href=\"#\">class=&#8221;ghost-red&#8221;<\/a><\/span><br \/>\n<\/div><div class=\"prpl-column two-thirds\"><br \/>\n<strong>Transparent background with red label text and outline.<\/strong> Best for use on white or light backgrounds. Set button class=&#8221;ghost-red&#8221;.<br \/>\n<\/div><\/div><br \/>\n<strong>Code sample:<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;&#x5B;button class=&quot;ghost-red&quot;]&lt;a href=&quot;URL goes here&quot;&gt;Button copy goes here&lt;\/a&gt;&#x5B;\/button]]\r\n<\/pre>\n<p>When your button is on a dark background, you can use the <strong>white<\/strong> and <strong>ghost-white<\/strong> classes.<\/p>\n<blockquote class=\"red\"><p><span class=\"prpl-button white\"><a href=\"#\">class=&#8221;white&#8221;<\/a><\/span><span class=\"prpl-button ghost-white\"><a href=\"#\">class=&#8221;ghost-white&#8221;<\/a><\/span><\/p><\/blockquote>\n<h2>Button Width<\/h2>\n<p>You can use the <strong>class<\/strong> &#8220;full-width&#8221; to make the button take up the full width of its container. Here are three buttons in three columns.<\/p>\n<div class=\"prpl-row\"><div class=\"prpl-column one-third\"><span class=\"prpl-button full-width\"><a href=\"URL goes here\">Button1<\/a><\/span><\/div><div class=\"prpl-column one-third\"><span class=\"prpl-button full-width\"><a href=\"URL goes here\">Button2<\/a><\/span><\/div><div class=\"prpl-column one-third\"><span class=\"prpl-button full-width\"><a href=\"URL goes here\">Button3<\/a><\/span><\/div><\/div>\n<p>The layout above combines buttons with the <a rel=\"noopener noreferrer\" href=\"http:\/\/www.montclair.edu\/web-services\/montclair-edu-website-framework\/wordpress-shortcodes\/rows-and-columns\/\" target=\"_blank\">rows and columns shortcodes<\/a>. To make an evenly divided row of 3 buttons, copy and paste the code sample below into the text editor on your WordPress page:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;&#x5B;row]&#x5B;column class=&quot;one-third&quot;]&#x5B;button class=&quot;full-width&quot;]&lt;a href=&quot;URL goes here&quot;&gt;Button1&lt;\/a&gt;&#x5B;\/button]&#x5B;\/column]&#x5B;column class=&quot;one-third&quot;]&#x5B;button class=&quot;full-width&quot;]&lt;a href=&quot;URL goes here&quot;&gt;Button2&lt;\/a&gt;&#x5B;\/button]&#x5B;\/column]&#x5B;column class=&quot;one-third&quot;]&#x5B;button class=&quot;full-width&quot;]&lt;a href=&quot;URL goes here&quot;&gt;Button3&lt;\/a&gt;&#x5B;\/button]&#x5B;\/column]&#x5B;\/row]]\r\n<\/pre>\n<p>If you&#8217;d prefer a button&#8217;s width to reflect its label length, you can use the <strong>buttonrow<\/strong> shortcode. Buttons using this shortcode will display at mixed widths at desktop resolutions, but will stack in consistent widths at mobile resolutions.<\/p>\n<p class=\"prpl-button-row\"><span class=\"prpl-button\"><a href=\"#\">A Very Long Button Label<\/a><\/span><span class=\"prpl-button\"><a href=\"#\">Short<\/a><\/span><span class=\"prpl-button\"><a href=\"#\">Average Length Button<\/a><\/span><\/p>\n<p>To make a row of buttons like those shown about, copy and paste this string of short code into the text editor on your WordPress page:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;&#x5B;buttonrow]&#x5B;button]&lt;a href=&quot;#&quot;&gt;A Very Long Button Label&lt;\/a&gt;&#x5B;\/button]&#x5B;button]&lt;a href=&quot;#&quot;&gt;Short&lt;\/a&gt;&#x5B;\/button]&#x5B;button]&lt;a href=&quot;#&quot;&gt;Average Length Button&lt;\/a&gt;&#x5B;\/button]&#x5B;\/buttonrow]]\r\n<\/pre>\n<h2>Additional Code Samples<\/h2>\n<h3>Buttons with various styles<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;&#x5B;button]&lt;a href=&quot;#&quot;&gt;Default style&lt;\/a&gt;&#x5B;\/button]]\r\n\r\n&#x5B;&#x5B;button class=&quot;ghost-red&quot;]&lt;a href=&quot;#&quot;&gt;Ghost Red Style&lt;\/a&gt;&#x5B;\/button]]\r\n\r\n&#x5B;&#x5B;button class=&quot;ghost-red full-width&quot;]&lt;a href=&quot;#&quot;&gt;Full Width Ghost Red Style&lt;\/a&gt;&#x5B;\/button]]\r\n<\/pre>\n<h3>Buttonrow<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;&#x5B;buttonrow]&#x5B;button]&lt;a href=&quot;#&quot;&gt;Default style&lt;\/a&gt;&#x5B;\/button]&#x5B;\/buttonrow]]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Adding buttons to your website is a great way to draw attention to important calls to action for site visitors. To add buttons to your content, use the button shortcode, which converts basic links into buttons. Buttons on montclair.edu can be displayed in different styles. To change the appearance of a button, use the class [&hellip;]<\/p>\n","protected":false},"author":411,"featured_media":3554,"parent":3552,"menu_order":9,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-3562","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3562","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=3562"}],"version-history":[{"count":3,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3562\/revisions"}],"predecessor-version":[{"id":3657,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3562\/revisions\/3657"}],"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=3562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}