# Redirection 404 not using error page template

**URL:** <https://forum.bricksbuilder.io/t/redirection-404-not-using-error-page-template/10789>\
**Category:** How To\
**Created:** [March 18, 2023, 9:40am UTC](https://forum.bricksbuilder.io/t/redirection-404-not-using-error-page-template/10789 "2023-03-18T09:40:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Tom](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://forum.bricksbuilder.io/u/Tom)\
**Post date:** [June 1, 2023, 1:21pm UTC](https://forum.bricksbuilder.io/t/redirection-404-not-using-error-page-template/10789/2 "2023-06-01T13:21:05Z")

</div>

Did you figure out a solution to this? (from the URLs it looks like not)

I posted a similar question recently:

> [@How Do I Set a 404 Error in PHP and have the Bricks 404 Error Page show?](https://forum.bricksbuilder.io/t/how-do-i-set-a-404-error-in-php-and-have-the-bricks-404-error-page-show/12651):
>
> In a few code snippets I may have to trigger a 404 error which I do with the following code. // error 404 is displayed global $wp\_query; $wp\_query-\>set\_404(); status\_header(404); The thing I notice is that WordPress just shows the standard " Whoops, that page is gone" 404 page instead of the Bricks Error Page template I have all setup. The Bricks Error template page works fine for missing pages when typed in the browser URL but not when a 404 er…

and found another similar one:

> [@WIP: Can't see the 404 template](https://forum.bricksbuilder.io/t/cant-see-the-404-template/9609):
>
> I had a post about how to make certain page output conditions? I never got a response, but I did it anyway. add\_action( 'template\_redirect', 'my\_404event', 1 ); function my\_404event() { global $post, $wp\_query; if ( is\_singular( 'product' ) && get\_post\_status( $post )=='approved' && $post-\>post\_author != get\_current\_user\_id()) { $wp\_query-\>set\_404(); status\_header(404); include( get\_query\_template( '404' ) ); // include( get\_404\_template()); exit…

but no answers… there has to be a way to load the Bricks custom 404 error page…

---

_[View the full topic](https://forum.bricksbuilder.io/t/redirection-404-not-using-error-page-template/10789)._
