{"id":6238,"date":"2020-07-16T02:41:23","date_gmt":"2020-07-16T09:41:23","guid":{"rendered":"http:\/\/digitalaccesspass.com\/doc\/?p=6238"},"modified":"2021-01-18T15:03:10","modified_gmt":"2021-01-18T23:03:10","slug":"custom-error-page","status":"publish","type":"post","link":"http:\/\/digitalaccesspass.com\/doc\/custom-error-page\/","title":{"rendered":"Custom Error Page"},"content":{"rendered":"<p>When users try to access a protected page in a not-logged-in state, or if they are logged-in but don&#8217;t have access, DAP will display an error page.<\/p>\n<p>The error page looks like this by default (for not-logged-in users),<\/p>\n<p><span style=\"width: 100%;\"><img loading=\"lazy\" alt=\"\" width=\"635\" height=\"517\" src=\"\/\/digitalaccesspass.com\/images\/dap-error.png\" style=\"\"\/><\/span><\/p>\n<p style=\"text-align: left;\"><strong>Custom Error Page<\/strong><\/p>\n<p>If you don&#8217;t want to use the default error page, you can create a page in WordPress and use that as your error page!&nbsp;<\/p>\n<p><strong>Please follow these steps (just one-time setup):<\/strong><\/p>\n<\/p>\n<p><strong>Step 1: <\/strong>Create a page in WordPress.<\/p>\n<p>Let&#8217;s say you call it &#8220;<strong>error<\/strong>&#8220;.&nbsp;<\/p>\n<\/p>\n<p><strong>Step 2:&nbsp;<\/strong>You can add two different messages on this page &#8211; One for<em> logged-in users<\/em> and another for <em>not-logged-in users<\/em>.<\/p>\n<\/p>\n<p>You can use the DAP shortcode to display different messages to <strong>logged-in members without access<\/strong> and <strong>not-logged-in<\/strong> members.<\/p>\n<p><span style=\"width: 100%;\"><img loading=\"lazy\" alt=\"\" width=\"252\" height=\"340\" src=\"\/\/digitalaccesspass.com\/images\/errorpage.png\" style=\"\" data-width=\"252\" data-height=\"340\" data-init-width=\"540\" data-init-height=\"729\"\/><\/span><\/p>\n<p><strong>Here is an example:<\/strong><\/p>\n<\/p>\n<p style=\"\"><strong>[DAP isLoggedIn=&#8221;Y&#8221;]<\/strong><\/p>\n<p style=\"\">You\u2019re seeing this message either because this content is not yet available.<\/p>\n<p style=\"\">-OR-<\/p>\n<p style=\"\">If you haven\u2019t yet signed up for this content, then please <strong>visit this page<\/strong> to purchase access to this content.<\/p>\n<p style=\"\">-OR-<\/p>\n<p style=\"\">If you&#8217;ve purchased this product and unable to access this content, please <strong>contact us here<\/strong> and we&#8217;ll get this fixed up for you!<\/p>\n<p style=\"\"><strong>[\/DAP]<\/strong><\/p>\n<p style=\"\">\n<p style=\"\"><strong>[DAP isLoggedIn=&#8221;N&#8221;]<\/strong><\/p>\n<p style=\"\">This content is only available to logged-in members of this product. You\u2019re seeing this message because you are not logged-in.<\/p>\n<p style=\"\">Please login below:<\/p>\n<p style=\"\">[INSERT LOGIN SHORTCODE HERE]\n<p style=\"\"><strong>[\/DAP]<\/strong><\/p>\n<p><strong> <\/strong><\/p>\n<p><strong>Step 3:&nbsp;<\/strong>Visit the DAP Admin &gt;&gt; Setup &gt;&gt; Config page &gt;&gt; Access &amp; Navigation section &gt;&gt; set Error Page URL to <strong>\/error <\/strong>.<\/p>\n<p><span style=\"width: 100%;\"><img loading=\"lazy\" alt=\"\" width=\"796\" height=\"310\" src=\"\/\/digitalaccesspass.com\/images\/dapsetuperrorpage.png\" style=\"\" data-width=\"796\" data-height=\"310\" data-init-width=\"1525\" data-init-height=\"593\"\/><\/span><\/p>\n<p><strong>Step 4:&nbsp;<\/strong>Visit the DAP products page &gt;&gt; &#8220;Advanced&#8221; tab.<\/p>\n<\/p>\n<p>Select your product and set the Error Page URL to \/error. Do this for all of your products.<\/p>\n<p><span style=\"width: 100%;\"><img loading=\"lazy\" alt=\"\" width=\"762\" height=\"394\" src=\"\/\/digitalaccesspass.com\/images\/dapproducterror.png\" style=\"\" data-width=\"762\" data-height=\"394\" data-init-width=\"1583\" data-init-height=\"819\"\/><\/span><\/p>\n<p>That&#8217;s it!<\/p>\n<\/p>\n<p>Going forward, whenever you add a NEW product in DAP, the only thing you have to do is set the Error Page URL to \/error in the DAP Products page &gt;&gt; Advanced tab.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When users try to access a protected page in a not-logged-in state, or if they are logged-in but don&#8217;t have access, DAP will display an error page. The error page looks like this by default (for not-logged-in users), Custom Error Page If you don&#8217;t want to use the default error page, you can create a [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/6238"}],"collection":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/comments?post=6238"}],"version-history":[{"count":12,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/6238\/revisions"}],"predecessor-version":[{"id":6346,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/6238\/revisions\/6346"}],"wp:attachment":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/media?parent=6238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/categories?post=6238"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/tags?post=6238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}