Custom Theme for Single Pages - Page Not Found
Permalink
Hello,
How can I enable my custom theme to Single pages. I need to enable my custom theme for the 404-Page Not Found Page. Please help.
my custom theme -http://kaakkakkoottam.com/index.php...
my 404 page theme now -http://kaakkakkoottam.com/index.php/dsfdsf...
Thank you for the help
Jeevan
How can I enable my custom theme to Single pages. I need to enable my custom theme for the 404-Page Not Found Page. Please help.
my custom theme -http://kaakkakkoottam.com/index.php...
my 404 page theme now -http://kaakkakkoottam.com/index.php/dsfdsf...
Thank you for the help
Jeevan
Thanks for the link, but its not fully functioning answer.
In my application folder I have a page
/application/themes/CustomThemeFolder/page_not_found.php
the content of this page is below
Now I have application/single_pages/page_not_found.php
content of this file below
Since none of these solved my problem, I created a new Page Type > Page Template and Page through C5 Admin Panel. Screenshot Attached
The Link URL to that page is here >http://kaakkakkoottam.com/index.php/page-not-found...
But whenever an actual Page Not Found error happened the page shows default elemental theme only,(http://kaakkakkoottam.com/index.php/fdf)
not my custom theme. What shall I do now ?
thanks
Jeevan
In my application folder I have a page
/application/themes/CustomThemeFolder/page_not_found.php
the content of this page is below
<?php defined('C5_EXECUTE') or die("Access Denied."); $this->inc('elements/header.php'); ?> <main> <div class="container"> <div class="row"> <div class="col-sm-9 col-sm-offset-3"> <div class="jumbo"> <h1><?php echo t('404 Error')?></h1> <p><?php echo t('Page not found.')?></p> </div> </div> </div> </div> </main>
Viewing 15 lines of 16 lines. View entire code block.
Now I have application/single_pages/page_not_found.php
content of this file below
<?php defined('C5_EXECUTE') or die("Access Denied."); <?php header("HTTP/1.0 404 Not Found"); ?> $this->inc('elements/header.php'); ?> <main> <div class="container"> <div class="row"> <div class="col-sm-9 col-sm-offset-3"> <div class="jumbo"> <?php $a = new Area('Main'); ?> <?php $a->display($c); ?> <a href="<?php echo DIR_REL?>/"><?php echo t('Back to Home')?></a> </div> </div> </div>
Viewing 15 lines of 18 lines. View entire code block.
Since none of these solved my problem, I created a new Page Type > Page Template and Page through C5 Admin Panel. Screenshot Attached
The Link URL to that page is here >http://kaakkakkoottam.com/index.php/page-not-found...
But whenever an actual Page Not Found error happened the page shows default elemental theme only,(http://kaakkakkoottam.com/index.php/fdf)
not my custom theme. What shall I do now ?
thanks
Jeevan
Is your custom theme the active theme on the site? Did you clear (even if turned off) the cache after the addition of the page_not_found.php into your theme? I have tested this process on a fresh install of 5.7.5.3 and a custom theme installed with a package and it works for me.
You do not need to create a new page in the sitemap and if you have a page_not_found.php in your theme that should be used over the one in the single_pages directory.
You do not need to create a new page in the sitemap and if you have a page_not_found.php in your theme that should be used over the one in the single_pages directory.
I figured it out. I removed the file and added to my theme folder. And instead going through DashBoard, I directly edited the php file and then added contents through dashboard :P
any how, its working now.
Another milestone, I enabled same theme for my search page / search not found page. Please take a look
http://kaakkakkoottam.com/index.php/search?search_paths%5B%5D=&...
please search some thing not in the side
http://kaakkakkoottam.com/index.php...
-- Happy Concreting !! -
Jeevs
any how, its working now.
Another milestone, I enabled same theme for my search page / search not found page. Please take a look
http://kaakkakkoottam.com/index.php/search?search_paths%5B%5D=&...
please search some thing not in the side
http://kaakkakkoottam.com/index.php...
-- Happy Concreting !! -
Jeevs
http://www.concrete5.org/community/forums/5-7-discussion/route-for-...