{"id":3620,"date":"2013-10-11T05:26:49","date_gmt":"2013-10-11T12:26:49","guid":{"rendered":"http:\/\/www.digitalaccesspass.com\/doc\/?p=3620"},"modified":"2020-07-16T02:47:25","modified_gmt":"2020-07-16T09:47:25","slug":"custom-error-page-1","status":"publish","type":"post","link":"http:\/\/digitalaccesspass.com\/doc\/custom-error-page-1\/","title":{"rendered":"Custom Error Page-1"},"content":{"rendered":"<h3>Problem<\/h3>\n<p>You try to visit a protected page that you&#8217;re not eligible to view, and don&#8217;t see the proper error message you are supposed to see.<\/p>\n<h3>Solution<\/h3>\n<ul>\n<li>Create a <strong>custom error page<\/strong> in WP &#8211; like <strong>http:\/\/YourSite.com\/error\/<\/strong><\/li>\n<li>In the body of that error page, enter something like this:<br \/>\n<em>Sorry, you do not have access to this content.<\/em><br \/>\n<em> If you are already a member, <strong>click here to login<\/strong>.<\/em><br \/>\n<em> If you are not a member yet, then click here to <strong>get access<\/strong>.<\/em><\/li>\n<li>In the above example, link the text &#8220;<strong>click here to login<\/strong>&#8221; to your DAP login page (eg., http:\/\/YourSite.com\/login\/). And link the &#8220;<strong>get access<\/strong>&#8221; text to your sales page.<\/li>\n<li>Then take this error page&#8217;s URL &#8211; which is <strong>http:\/\/YourSite.com\/error\/<\/strong> &#8211; and enter it into the &#8220;<strong>Error Page URL<\/strong>&#8221; field of <strong>all<\/strong> DAP Products.<\/li>\n<li>Also enter this same URL into <strong>DAP Admin &gt; Setup &gt; Config &gt; &#8220;Error Page URL (Global)&#8221;<\/strong>.<\/li>\n<\/ul>\n<p>Save the changes.<\/p>\n<p>Now, in a different browser, first visit your logout link &#8211; http:\/\/YourSite.com\/dap\/logout.php &#8211; so that the config changes can be reloaded. Now go back to that original protected page, and you should now be redirected to the above custom error page you created above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem You try to visit a protected page that you&#8217;re not eligible to view, and don&#8217;t see the proper error message you are supposed to see. Solution Create a custom error page in WP &#8211; like http:\/\/YourSite.com\/error\/ In the body of that error page, enter something like this: Sorry, you do not have access to [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12,16,116,45,43,124,46],"tags":[],"_links":{"self":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/3620"}],"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\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/comments?post=3620"}],"version-history":[{"count":2,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/3620\/revisions"}],"predecessor-version":[{"id":6250,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/3620\/revisions\/6250"}],"wp:attachment":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/media?parent=3620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/categories?post=3620"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/tags?post=3620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}