{"id":1598997,"date":"2020-04-24T11:21:42","date_gmt":"2020-04-24T11:21:42","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=1598997"},"modified":"2021-06-01T10:16:28","modified_gmt":"2021-06-01T10:16:28","slug":"dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/es\/course-lesson\/dynamic-galleries-and-sliders-for-templates-displaying-repeating-image-fields\/","title":{"rendered":"Dynamic Galleries and Sliders for Templates, Displaying Repeating Image Fields"},"content":{"rendered":"\n<p>Before you get started, identify which &#8220;post type&#8221; you are working on. You will create or edit a <a href=\"https:\/\/toolset.com\/es\/glossary\/template\/\">template<\/a> that shows all the items of a certain <a href=\"https:\/\/toolset.com\/es\/glossary\/custom-post-type\/\">post type<\/a>.<\/p>\n\n\n\n<h2 class=\"tb-heading\" data-toolset-blocks-heading=\"8a75f852e429bee91a564c6f9f9d2dbe\" data-last-update=\"1.4\">Follow these steps<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Navigate to <strong>Toolset\u2192Dashboard<\/strong> and click to create or edit the fields group for the post-type.<\/li><li>Add to the post-type a <strong><a href=\"https:\/\/toolset.com\/glossary\/custom-fields\/\">custom field<\/a><\/strong> of type <strong>Image <\/strong>field. Make it a <strong>repeating<\/strong>.<\/li><li>Add sets of <strong>images to the different posts<\/strong> (use the repeating image field that you just created).<\/li><li>Navigate to <strong>Toolset\u2192Dashboard<\/strong> and click to Create or edit a <strong>Content Template<\/strong> for your post type.<\/li><li>When editing the Content Template, insert <strong>Toolset Gallery<\/strong> or <strong>Toolset Image Slider<\/strong> blocks and select a layout.<\/li><li>Click to use <strong>dynamic sources<\/strong> and then select the custom field you created in step 2.<\/li><li>Style your gallery block or slider block.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Styling the gallery or slider in the template<\/h2>\n\n\n\n<p>The gallery and image blocks offer a number of styling options.<\/p>\n\n\n\n<p>You can:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Select the number of columns<\/li><li>Turn image cropping on and off<\/li><li>Display or hide captions<\/li><li>Change the slider output style<\/li><li>Style the captions (but not edit their text)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Modifying the images that appear in the gallery or slider<\/h2>\n\n\n\n<p>Remember that you are adding a gallery or a slider onto a template. If you want to modify the images that different posts show using this template, you need to edit the posts. The template only shows the images that belong to each post.<\/p>\n\n\n\n<p>Edit the individual posts to:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Select different images<\/li><li>Reorder the images<\/li><li>Edit image captions<\/li><\/ul>\n\n\n\n<p>You can apply different options to your images. Check out the lesson about <a href=\"https:\/\/toolset.com\/es\/course-lesson\/displaying-images-with-toolset\/\">displaying images with Toolset<\/a> to learn more.<\/p>\n","protected":false},"author":4341,"featured_media":1599345,"template":"","related-lesson":[8419,8415],"class_list":["post-1598997","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-galleries","related-lesson-sliders"],"_links":{"self":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/1598997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":3,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/1598997\/revisions"}],"predecessor-version":[{"id":2073395,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/1598997\/revisions\/2073395"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media\/1599345"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media?parent=1598997"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/related-lesson?post=1598997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}