{"id":154,"date":"2019-05-21T12:51:24","date_gmt":"2019-05-21T12:51:24","guid":{"rendered":"http:\/\/pwa-for-wp.com\/docs\/?post_type=ht_kb&#038;p=154"},"modified":"2019-09-24T11:30:54","modified_gmt":"2019-09-24T11:30:54","slug":"how-to-add-to-home-on-element-click","status":"publish","type":"ht_kb","link":"https:\/\/pwa-for-wp.com\/docs\/article\/how-to-add-to-home-on-element-click\/","title":{"rendered":"How to Add To Home On Element Click"},"content":{"rendered":"<p><strong>This tutorial is to show you how you can set up Add to Home on Element click. let\u2019s get into it.<\/strong><\/p>\n<p>When you click on any element and you want to &#8220;<strong>Add to Home<\/strong>&#8221; on any device then follow the below steps<\/p>\n<p><strong>1.<\/strong> First, you need to select ID or Class of that element<\/p>\n<p><strong>2.<\/strong> Copy of that element Id or Class and paste<\/p>\n<p>Go to <strong>WordPress dashboard<\/strong> -&gt;<strong> PWA &#8211;<\/strong>&gt; <strong>Settings<\/strong> -&gt; <strong>Advanced<\/strong> -&gt; In this option &#8220;<strong>Add to Home On Element click<\/strong> &#8221; you need to enter ID or Class Of that element like below the screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-449\" src=\"https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1.png\" alt=\"\" width=\"1061\" height=\"594\" srcset=\"https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1.png 1061w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1-300x168.png 300w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1-768x430.png 768w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1-1024x573.png 1024w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1-50x28.png 50w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1-60x34.png 60w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/2-1-100x56.png 100w\" sizes=\"auto, (max-width: 1061px) 100vw, 1061px\" \/><\/p>\n<p><strong>3.<\/strong> Click on the &#8220;<strong>Save Settings<\/strong>&#8221; button.<\/p>\n<p>Once you click on any elements message will appear on browser &#8220;Add to Home&#8221; like below the screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-161 aligncenter\" src=\"https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/pwa-2.png\" alt=\"\" width=\"315\" height=\"524\" srcset=\"https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/pwa-2.png 315w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/pwa-2-180x300.png 180w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/pwa-2-30x50.png 30w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/pwa-2-36x60.png 36w, https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/pwa-2-60x100.png 60w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><\/p>\n<p style=\"background-color: #ffdddd; border-left: 2px solid #f44336; padding: 10px;\"><strong>Note:<\/strong> Currently this <strong>Add to Home on Element click <\/strong>functionality works on Non-AMP version only.<\/p>\n<h4>To make it easy, we have created a video.<\/h4>\n<div style=\"width: 643px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-154-1\" width=\"643\" height=\"310\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/Recording-32.mp4?_=1\" \/><a href=\"https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/Recording-32.mp4\">https:\/\/pwa-for-wp.com\/docs\/wp-content\/uploads\/2019\/05\/Recording-32.mp4<\/a><\/video><\/div>\n<h4><\/h4>\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n<p>We hope we\u2019ve clear your doubts in case If you have any feedback or questions, Just contact us\u00a0<b>here and<\/b>\u00a0we are always available for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial is to show you how you can set up Add to Home on Element click. let\u2019s get into it. When you click on any element and you want to &#8220;Add to Home&#8221; on any device then follow the below steps 1. First, you need to select ID or&#8230;<\/p>\n","protected":false},"author":3,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[6],"ht-kb-tag":[],"class_list":["post-154","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-how-to"],"_links":{"self":[{"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":10,"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/154\/revisions"}],"predecessor-version":[{"id":450,"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/154\/revisions\/450"}],"wp:attachment":[{"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=154"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/pwa-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}