Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

[SOLVED] how to override Atahualpa default 404's?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Jun 7, 2009, 04:29 PM
gjt
 
2 posts · Jun 2009
Atahualpa has "overidden" my sites custom 404 error page as specified in .htaccess. I discovered it has to do with the WP Permalink coding in .htaccess since if I remove this code, my custom 404 works as it should.

I have a large site of which WP is only a part, albeit an important part (it's installed in a /blog subdirectory). However, I'd rather have my custom 404 page with all my standard navigational templates used sitewide than the "404" (technically I don't think it's really a 404 page, though I certainly be wrong about that) generated by the blog theme which, of course, uses the Atahualpa templates.

How can I wrestle control of my 404 page back from WP/Atahaulpa?
  #2  
Old Jun 10, 2009, 09:18 AM
Flynn's Avatar
Flynn
 
3,766 posts · Oct 2008
Munich, Germany
This is not Atahualpa specific. The default Wordpress .htaccess file redirects every non-existing file or directory request inside the Wordpress directory to Wordpress. This should not take over the non-WP parts of your site, unless you have the .htaccess file at domain.com/.htaccess and the Wordpress installation at domain.com/blog-directory. In that case you may have to add

RewriteBase /blog-directory

to the .htaccess file, or move it to the Wordpress directory

http://httpd.apache.org/docs/1.3/mod...ml#RewriteBase

You can also make a copy of Atahualpa's index.php as 404.php and edit that file
  #3  
Old Jun 10, 2009, 05:40 PM
gjt
 
2 posts · Jun 2009
Thanks Flynn. You got me going on the right track.

For those of you keeping score at home...

My mistake was placing the WP Permalink code in my root directory .htaccess. With my particular configuration that Permalink code needed to be in a separate .htaccess located in the mydomain.com/blog directory (i.e. the root directory for my blog...as you pointed out). I hadn't realized you could have multiple .htaccess files on a single site...they just have to reside in different directories.

I never tried RewriteBase though I'm sure that would work too.

In any event, I now have the best of both worlds. My static site displays custom error pages based on my static site templates and my blog displays 404 errors based on Atahualpa templates.
  #4  
Old Jul 26, 2009, 05:14 AM
Neceros
 
4 posts · Jul 2009
I have a question in the same regard: What's the best way to edit what's shown for 404? Basically, if instead of putting up a 404 at all, could I just redirect someone to a default page?

I'm not sure if that would be the work of my theme, or a plugin. Thanks!
  #5  
Old Aug 14, 2009, 08:05 AM
hospitalera
 
72 posts · Mar 2009
Prague
I had the same idea as Neceros, I created a page that I want to have displayed each time when a 404 error occurs. So, how do I do a redirect to display that page now instead of the "normal" 404 error page. SY
__________________
Hospitalera's Blog
  #6  
Old Aug 14, 2009, 09:35 AM
hospitalera
 
72 posts · Mar 2009
Prague
OK, I found out that I have to add

ErrorDocument 404 http://hospitalera.com/welcome/

to my .htaccess file, but whichever location I try out inside the file, it doesn't work, and yes I cleared my cache between attempts. Where is my mistake? SY
__________________
Hospitalera's Blog
  #7  
Old Aug 14, 2009, 10:40 AM
hospitalera
 
72 posts · Mar 2009
Prague
OK, I found my own answer. Basically you have to create a 404.php file, add the content you want to show and upload it to your Atahualpa theme folder. Just done it and it works fine in FF and IE. Now I am a tiny bit exhausted because I have never touched php before ;-) If there is interest I can post a link to my, planned, blog post "How to make your own Atahualpa custom error page" when it is written, see ya, SY
__________________
Hospitalera's Blog
  #8  
Old Aug 15, 2009, 07:36 AM
hospitalera
 
72 posts · Mar 2009
Prague
OK, here we go, my personal take at how to create a custom error 404 Wordpress page, SY
__________________
Hospitalera's Blog
  #9  
Old May 28, 2010, 07:15 AM
WinObs
 
1 posts · May 2010
Thanks for the code on showing recent posts - added it to my own 404

http://www.windowsobserver.com/404.php
  #10  
Old Dec 7, 2012, 02:05 PM
runnerb0y
 
67 posts · Nov 2010
WinObs,

Sorry to dig up this thread, but I'm trying to build a custom 404 page as well. When I used the example 404.php code on my ATA 3.7.9 site, it bombs. I've created many .php files so there's not an issue there (in terms of file being a true text file, proper file permissions, etc..). The example code crashes on line 9.

I like the look of your 404 page, what did you do to achieve that?

TIA for any assistance.
  #11  
Old Dec 7, 2012, 04:32 PM
lmilesw's Avatar
lmilesw
 
10,108 posts · Jul 2009
Central New York State USA
You can copy the 404.php from the TwentyEleven theme folder and put it in the Atahualpa theme folder. Edit as you wish.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #12  
Old Dec 10, 2012, 07:37 PM
runnerb0y
 
67 posts · Nov 2010
Quote:
Originally Posted by lmilesw
You can copy the 404.php from the TwentyEleven theme folder and put it in the Atahualpa theme folder. Edit as you wish.
lmilesw,

That worked perfectly. Also I found out that a search that returned nothing wasn't going to my custom 404.php page but simply by duplicating the 404.php to a file named search.php, it all works well. Not sure this is the best solution, but it's easy and it works so I'll stick with it until I see it's causing me trouble.

Thanks for the assist.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Override Table CSS? jkestler Atahualpa 3 Wordpress theme 10 Dec 26, 2011 06:45 PM
How to change the default Avatar whatsmytruth Comments, trackbacks & pings 5 May 14, 2009 08:39 PM
My site keeps reverting to the "Default" template from Atahualpa! Leonardo T Dragon Atahualpa 3 Wordpress theme 3 May 8, 2009 02:40 PM
404 error seneque Atahualpa 3 Wordpress theme 1 Apr 11, 2009 11:20 PM
How to override CSS in widget "Text" ?? joe hark Sidebars & Widgets 2 Mar 1, 2009 11:43 PM


All times are GMT -6. The time now is 03:24 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.