This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Custom 404 Page

Resolved 9 replies premiumthemetheme-vantage
10 years ago · Last reply by Andrew Misplon 10 years ago

Hi,

I’ve made changes to my membership site: When a user signs up and logs in, certain public pages will be hidden from them, as they are suppose to navigate forward and view the member pages. This works smoothly most of the time, except if a user hits the back button (or manually enters a URL) and tries to access the pages they already visited before logging in or signing up. They would then see a 404 page if viewing a public page (now hidden from them).

I’d like to create a custom 404 page with some useful links and a message letting them know where to go.

I have a child theme and can add 404.php to it for editing. But, I was curious if you guys have a template with all of the page items removed (search bar, categories, tags, etc)? This would be easier for me to use to edit.

My 404 page would simply need to contain a few sentences and links.

URL: https://rockclass101.com/

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

9
  1. hardel 10 years, 4 months ago

    I have redirection plugin installed. If it is easier to use that to redirect to a page I create, I am open to that as well.

  2. Andrew Misplon Staff 10 years, 4 months ago

    Hi hardel

    Using redirection would indeed be easier than editing the 404 template in your child theme. When adding a new redirect under action you can choose 404. Let me know how that goes.

  3. hardel 10 years, 4 months ago

    Hey Andrew,

    How do I set up the 404 redirect? I tried to, and it did not work.

    I’d like to redirect to this page for all 404 errors: https://rockclass101.com/404-error-page-not-found/

    The options in redirection are:

    Source URL: (blank)

    Match:
    1) URL Only
    2) URL and referrer
    3) URL and user agent
    4) URL and login status

    Action: Error (404) – as you stated to use

    Regular expression: (check or leave unchecked?)

    Group:
    1) Redirections
    2) Modified Posts

  4. Andrew Misplon Staff 10 years, 4 months ago

    Sorry, taking a harder look now I’m not sure Redirection can make this change for us.

    Perhaps this plugin will help?

    https://wordpress.org/plugins/custom-404-pro/

  5. hardel 10 years, 4 months ago

    Andrew,

    Can you help me with a manual edit or redirect? Is it possible to place a code in the child theme 404.php to redirect to a custom page I made? Or can we add a code line to my htaccess file to do this?

    I realize I can edit the child 404.php file, but I would prefer to use the page builder layout for a nicer 404 page appearance.

  6. Andrew Misplon Staff 10 years, 4 months ago

    You can edit your htaccess file and set it that way for sure:

    http://www.thesitewizard.com/archive/custom404.shtml

  7. hardel 10 years, 4 months ago

    Htaccess will not work b/c of WP overwrite rules.

    So the solution was to create a child theme 404.php and input the following code. Hope this helps someone, as it is extremely useful since my site is a business, I need a custom error page to help redirect logged in/out members.

  8. hardel 10 years, 4 months ago
  9. Andrew Misplon Staff 10 years, 4 months ago

    Thanks for sharing your process here. Glad to hear you were able to resolve in the end.

    All the best.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread