{"id":327,"date":"2018-12-26T14:53:51","date_gmt":"2018-12-26T14:53:51","guid":{"rendered":"https:\/\/help.unitedover.com\/digits\/?post_type=manual_kb&#038;p=327"},"modified":"2023-07-04T09:31:55","modified_gmt":"2023-07-04T09:31:55","slug":"how-to-change-link-of-existing-button-to-digits-modal-or-page","status":"publish","type":"manual_kb","link":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/","title":{"rendered":"How to change the link of an existing button to Digits Modal or Page"},"content":{"rendered":"\n<p>This is generally needed when your theme does not handle login\/signup buttons from menu links and doesn&#8217;t have the option to change the links as well. With this, you can overwrite their button to trigger our popup or page.<\/p>\n\n\n\n<p>The easiest method to add the code when you&#8217;re not using a child theme is to use Code Snippets WordPress Plugin\u00a0or else if you&#8217;re comfortable with using a child theme then the best option is to use the child theme. Both of these methods are update-proof, so you won&#8217;t be losing changes when you update the plugins.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">To trigger Modal \/ Pop-Up<\/h2>\n\n\n\n<p>Below is the simple line of code you&#8217;ll need to add if you want to trigger the modal\/popup<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">jQuery(document).ready(function(){\n   jQuery('<span style=\"color: #ff0000\">.class<\/span>').addClass('digits-login-modal').attr('type',<span style=\"color: #ff0000\">1<\/span>);\n});<\/pre>\n\n\n\n<p>Don&#8217;t forget to change the text marked in red according to your needs<\/p>\n\n\n\n<p><strong>.class<\/strong> represents the class of the button you want to make the change<\/p>\n\n\n\n<p> <strong>If using Code Snippet Plugin then use the below code<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'wp_head', function () { ?&gt;\n&lt;script&gt;\n\njQuery(document).ready(function(){\n   jQuery('<span style=\"color: #ff0000\">.class<\/span>').addClass('digits-login-modal').attr('type',<span style=\"color: #ff0000\">1<\/span>);\n});\n\n&lt;\/script&gt;\n&lt;?php } );<\/code><\/pre>\n\n\n\n<p>Don&#8217;t forget to change the text marked in red according to your needs<\/p>\n\n\n\n<p><strong>.class<\/strong> represents the class of the button you want to make the change<\/p>\n\n\n\n<p>type value <strong>1&nbsp;<\/strong>represents the type of form you want to trigger, the values of different types are given below<\/p>\n\n\n\n<p><strong><em>Login\/Sign-Up<\/em><\/strong>: 1<strong><em><br>Registration<\/em><\/strong>: 2<br><strong><em>Forgot Password<\/em><\/strong>: 3<br><strong><em>Only Login<\/em><\/strong>: 4<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">To trigger Page<\/h2>\n\n\n\n<p>If you want to trigger the page instead then you can use the below code<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> jQuery(document).ready(function () {\n    jQuery('<span style=\"color:#ff0000\" class=\"tadv-color\">.class<\/span>').addClass('open_link').attr({'type': <span style=\"color:#ff0000\" class=\"tadv-color\">1<\/span>, 'href': '?login=true&amp;type=<span style=\"color:#ff0000\" class=\"tadv-color\">1<\/span>'});\n    jQuery(document).on('click', '.open_link', function (e) {\n        location.href = jQuery(this).attr('href');\n    });\n}); <\/pre>\n\n\n\n<p>Don&#8217;t forget to change the text marked in red according to your needs<\/p>\n\n\n\n<p><strong>.class<\/strong> represents the class of the button you want to make the change<\/p>\n\n\n\n<p><strong>If using Code Snippet Plugin then use the below code<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'wp_head', function () { ?&gt;&lt;script&gt;\n\njQuery(document).ready(function () {\n    jQuery('<span style=\"color: #ff0000\">.class<\/span>').addClass('open_link').attr({'type': <span style=\"color: #ff0000\">1<\/span>, 'href': '?login=true&amp;type=<span style=\"color: #ff0000\">1<\/span>'});\n    jQuery(document).on('click', '.open_link', function (e) {\n        location.href = jQuery(this).attr('href');\n    });\n}); \n\n&lt;\/script&gt;\n&lt;?php } );<\/code><\/pre>\n\n\n\n<p>Don&#8217;t forget to change the text marked in red according to your needs<\/p>\n\n\n\n<p><strong>.class<\/strong> represents the class of the button you want to make the change<\/p>\n\n\n\n<p>type value <strong>1&nbsp;<\/strong>represents the type of form you want to trigger, the values of different types are given below<\/p>\n\n\n\n<p><strong><em>Login\/Sign-Up<\/em><\/strong>: 1<strong><em><br>Registration<\/em><\/strong>: 2<br><strong><em>Forgot Password<\/em><\/strong>: 3<br><strong><em>Only Login<\/em><\/strong>: 4<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Direct Links<\/strong><\/h4>\n\n\n\n<p><strong>Login\/Registration: <\/strong><span style=\"color:#ff0000\" class=\"tadv-color\">yourwebsite.com<\/span>\/?login=true<strong><br>Registration: <\/strong><span style=\"color:#ff0000\" class=\"tadv-color\">yourwebsite.com<\/span>\/?login=true&amp;type=register<br><strong>Forgot Password:<\/strong> <span style=\"color:#ff0000\" class=\"tadv-color\">yourwebsite.com<\/span>\/?login=true&amp;type=forgot-password<br><strong>Only Login:<\/strong> <span style=\"color:#ff0000\" class=\"tadv-color\">yourwebsite.com<\/span>\/?login=true&amp;type=login<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>NOTE: <\/strong>If you use this to change your existing theme modal with ours then adding this will trigger two modals (your existing one and ours), so you will have to use CSS to hide that existing modal. <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Builder<\/h2>\n\n\n\n<p>The above-mentioned steps even work with the builder once you set default pages and modal for the ones you need in builder settings.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1305\" height=\"928\" src=\"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif\" alt=\"\" class=\"wp-image-664\" \/><\/figure>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":68,"template":"","format":"standard","manualknowledgebasecat":[4],"manual_kb_tag":[],"class_list":["post-327","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-how-to"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Change Existing Button Links to Digits Modal or Page in WordPress<\/title>\n<meta name=\"description\" content=\"Learn how to customize button links on your WordPress website to redirect users to Digits Modal or Page for seamless authentication and registration. This comprehensive guide will walk you through the process of updating the link of an existing button to open Digits Modal or Page. Follow these step-by-step instructions to enhance user experience and leverage the power of Digits for user authentication.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change Existing Button Links to Digits Modal or Page in WordPress\" \/>\n<meta property=\"og:description\" content=\"Learn how to customize button links on your WordPress website to redirect users to Digits Modal or Page for seamless authentication and registration. This comprehensive guide will walk you through the process of updating the link of an existing button to open Digits Modal or Page. Follow these step-by-step instructions to enhance user experience and leverage the power of Digits for user authentication.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/\" \/>\n<meta property=\"og:site_name\" content=\"Digits Help\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-04T09:31:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/\",\"url\":\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/\",\"name\":\"How to Change Existing Button Links to Digits Modal or Page in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/help.unitedover.com\/digits\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif\",\"datePublished\":\"2018-12-26T14:53:51+00:00\",\"dateModified\":\"2023-07-04T09:31:55+00:00\",\"description\":\"Learn how to customize button links on your WordPress website to redirect users to Digits Modal or Page for seamless authentication and registration. This comprehensive guide will walk you through the process of updating the link of an existing button to open Digits Modal or Page. Follow these step-by-step instructions to enhance user experience and leverage the power of Digits for user authentication.\",\"breadcrumb\":{\"@id\":\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#primaryimage\",\"url\":\"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif\",\"contentUrl\":\"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif\",\"width\":1305,\"height\":928},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/help.unitedover.com\/digits\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to change the link of an existing button to Digits Modal or Page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/help.unitedover.com\/digits\/#website\",\"url\":\"https:\/\/help.unitedover.com\/digits\/\",\"name\":\"Digits Help\",\"description\":\"WordPress Mobile Number Signup and Login\",\"publisher\":{\"@id\":\"https:\/\/help.unitedover.com\/digits\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/help.unitedover.com\/digits\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/help.unitedover.com\/digits\/#organization\",\"name\":\"UnitedOver\",\"url\":\"https:\/\/help.unitedover.com\/digits\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/help.unitedover.com\/digits\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/11\/logo512.png\",\"contentUrl\":\"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/11\/logo512.png\",\"width\":512,\"height\":512,\"caption\":\"UnitedOver\"},\"image\":{\"@id\":\"https:\/\/help.unitedover.com\/digits\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change Existing Button Links to Digits Modal or Page in WordPress","description":"Learn how to customize button links on your WordPress website to redirect users to Digits Modal or Page for seamless authentication and registration. This comprehensive guide will walk you through the process of updating the link of an existing button to open Digits Modal or Page. Follow these step-by-step instructions to enhance user experience and leverage the power of Digits for user authentication.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/","og_locale":"en_US","og_type":"article","og_title":"How to Change Existing Button Links to Digits Modal or Page in WordPress","og_description":"Learn how to customize button links on your WordPress website to redirect users to Digits Modal or Page for seamless authentication and registration. This comprehensive guide will walk you through the process of updating the link of an existing button to open Digits Modal or Page. Follow these step-by-step instructions to enhance user experience and leverage the power of Digits for user authentication.","og_url":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/","og_site_name":"Digits Help","article_modified_time":"2023-07-04T09:31:55+00:00","og_image":[{"url":"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/","url":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/","name":"How to Change Existing Button Links to Digits Modal or Page in WordPress","isPartOf":{"@id":"https:\/\/help.unitedover.com\/digits\/#website"},"primaryImageOfPage":{"@id":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#primaryimage"},"image":{"@id":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#primaryimage"},"thumbnailUrl":"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif","datePublished":"2018-12-26T14:53:51+00:00","dateModified":"2023-07-04T09:31:55+00:00","description":"Learn how to customize button links on your WordPress website to redirect users to Digits Modal or Page for seamless authentication and registration. This comprehensive guide will walk you through the process of updating the link of an existing button to open Digits Modal or Page. Follow these step-by-step instructions to enhance user experience and leverage the power of Digits for user authentication.","breadcrumb":{"@id":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#primaryimage","url":"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif","contentUrl":"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/12\/1580052298.gif","width":1305,"height":928},{"@type":"BreadcrumbList","@id":"https:\/\/help.unitedover.com\/digits\/kb\/how-to-change-link-of-existing-button-to-digits-modal-or-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/help.unitedover.com\/digits\/"},{"@type":"ListItem","position":2,"name":"How to change the link of an existing button to Digits Modal or Page"}]},{"@type":"WebSite","@id":"https:\/\/help.unitedover.com\/digits\/#website","url":"https:\/\/help.unitedover.com\/digits\/","name":"Digits Help","description":"WordPress Mobile Number Signup and Login","publisher":{"@id":"https:\/\/help.unitedover.com\/digits\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/help.unitedover.com\/digits\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/help.unitedover.com\/digits\/#organization","name":"UnitedOver","url":"https:\/\/help.unitedover.com\/digits\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.unitedover.com\/digits\/#\/schema\/logo\/image\/","url":"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/11\/logo512.png","contentUrl":"https:\/\/help.unitedover.com\/digits\/wp-content\/uploads\/sites\/2\/2018\/11\/logo512.png","width":512,"height":512,"caption":"UnitedOver"},"image":{"@id":"https:\/\/help.unitedover.com\/digits\/#\/schema\/logo\/image\/"}}]}},"acf":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/manual_kb\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/manual_kb\/327\/revisions"}],"predecessor-version":[{"id":2189,"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/manual_kb\/327\/revisions\/2189"}],"wp:attachment":[{"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/media?parent=327"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/manualknowledgebasecat?post=327"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/help.unitedover.com\/digits\/wp-json\/wp\/v2\/manual_kb_tag?post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}