|
#1
Mar 20, 2009, 03:21 PM
|
|
Where can I add additional text/js to the 404 error page?
|
#2
Mar 20, 2009, 04:24 PM
|
|
There isn't a custom 404 error page in this theme. This is actually pretty common.It would be best to make a donation and then a request to Flynn to add it to the list for the next rev - since atahualpa uses a single file for all page handling.
If you don't mind hacking the theme, you can edit the index.php file and go to the end and change the 'NOT found' text to whatever you want.
|
#3
Mar 4, 2010, 09:55 PM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
I want to show my index.php for my 404 page. I have a site summary there, so somebody might find something relevant. So, I don't need a custom 404. So, how do you make the index.php so it can be used as a 404?
Thank you,
X
|
#4
Mar 5, 2010, 06:18 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
I beleive you just make a copy and name it 404.php
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
Mar 5, 2010, 08:49 AM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
I opened the index.php, saved as to 404.php, and added this line in the .htaccess:
ErrorDocument 404 /404.php
This is what happened:
Warning: include(TEMPLATEPATH/functions/bfa_get_options.php) [function.include]: failed to open stream: No such file or directory in /home/content/14/5765714/html/404.php on line 2
Warning: include() [function.include]: Failed opening 'TEMPLATEPATH/functions/bfa_get_options.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/14/5765714/html/404.php on line 2
Fatal error: Call to undefined function get_header() in /home/content/14/5765714/html/404.php on line 3
Help.
X
Edited to add: I went to permalinks and switched to another setting and switched back and now I don't get that error message. But, when I put in a page title that is not in my blog I get the original 404 message:
Not Found
Sorry, but you are looking for something that isn't here.
I don't get mine. Where should I put the 404.php? Should it be in the same place the index.php is or in the root?
Thank you,
X
Last edited by X-Evolutionist; Mar 5, 2010 at 08:54 AM.
Reason: Added "edited to add" info
|
#6
Mar 5, 2010, 10:01 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
1) did you copy the Atahualpa index.php?
2) it must be in the atahualpa folder
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Last edited by juggledad; Mar 5, 2010 at 12:00 PM.
|
#7
Mar 5, 2010, 10:20 AM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
I used this file:
\wp-content\themes\atahualpa\index.php
Do I keep the 404.php in that folder or in the root? Do I list it in the .htaccess?
I previously had an html website in my domain where wordpress is now. I don't know what things are different and what are the same for using WordPress. Previously, I had my custom 404 in the root.
Thank you,
X
|
#8
Mar 5, 2010, 11:17 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#9
Mar 5, 2010, 11:52 AM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
It does not say where the 404.php goes: same as the index.php or in the root. X
|
#10
Mar 5, 2010, 12:00 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
re read post #6 item (2)
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11
Mar 5, 2010, 12:12 PM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
Oops. Sorry.
Thank you,
X
|
#12
Mar 5, 2010, 12:19 PM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
What file comes up with this text:
Not Found
Sorry, but you are looking for something that isn't here.
Can I just replace that text with mine?
X
|
#13
Mar 5, 2010, 12:45 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
it's displayed by the code in index.php
HTML Code:
<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_not_found']); ?>
the actual text is in bfa_theme_options.php
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#14
Mar 5, 2010, 01:01 PM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
Thank you,
X
|
#15
Mar 5, 2010, 05:54 PM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
I started a second blog today, with Atahualpa, of course. There is a 404 template in it, and I sure could not find one before. Did you add one in the past few days?
Just curious.
X
|
#16
Mar 7, 2010, 07:50 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
nope. no theme provided 404.php - may be something your host sitcks in
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#17
Mar 7, 2010, 08:11 AM
|
|
|
|
41 posts · Mar 2010
Californian living in Oklahoma City
|
|
Ok, Thank you!
X
|
#18
Oct 2, 2016, 06:10 PM
|
|
|
51 posts · Jun 2012
Canadian Maritimes
|
|
@Juggledad, I added a 404.php today following another post where you instructed someone to do so.
I tried the edit in the index.php but that didn't work. I think it had something to do with what my home page where blog posts go is called.
So now my error 404 page comes up like this http://vivbounty.net/this-page-not-here which is a standard edit from 2013 theme. No redirect, just search and not at all inspiring.
I would like to customize it to lead back to my static page, perhaps like this (at the very least):
"Oops, I screwed up and you discovered my fatal flaw.
Well, we're not all perfect, but we try. Can you try this
again or maybe visit our <a
title="Our Site" href="http://example.com/index.php">Home
Page</a> to start fresh. We'll do better next time."
The wording above is copied from another tutorial, and not words I would use, but you get the idea.
So I tried visit our <a
title="Home" href="http://vivbounty.net/index.php">Home
Page</a> to start fresh. We'll do better next time."
which returned a blank page. Just nothing.
The edit to the index you suggested in the other thread I read also returned a blank page.
Can you help?
Thanks in advance for any light you can shed on this for me.
Cheers,
Viv
|
#19
Oct 2, 2016, 06:20 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Add teh following to a TEXT file and save it as 404.php - customize it as you want
HTML Code:
<?php
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);
global $bfa_ata_postcount;
?>
<?php
//=================================
// put your customizations AFTER this
//================================= ?>
"Oops, I screwed up and you discovered my fatal flaw.
Well, we're not all perfect, but we try. Can you try this
again or maybe visit our <a
title="Our Site" href="http://example.com/index.php">Home
Page</a> to start fresh. We'll do better next time."
<?php
//=================================
// put your customizations BEFORE this
//================================= ?>
<?php get_footer(); ?>
Then put the file into the wp-content/themes/atahualpa folder
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#20
Oct 2, 2016, 06:43 PM
|
|
|
51 posts · Jun 2012
Canadian Maritimes
|
|
So I did this and got that blank page again.
Does it have something to do with ' vs " when adding custom text?
Code:
<?php
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);
global $bfa_ata_postcount;
?>
<?php
//=================================
// put your customizations AFTER this
//================================= ?>
"Oh dear, it looks like we misplaced a page.
So sorry about that. Can you try this
again or maybe visit our <a
title="Home" href="http://vivbounty.net/index.php">Home
Page</a> to start fresh. We'll do better next time."
<p><?php _e( 'Maybe try a search?', ); ?></p>
<?php get_search_form(); ?>
<?php
//=================================
// put your customizations BEFORE this
//================================= ?>
<?php get_footer(); ?>
|
#21
Oct 2, 2016, 06:56 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
You have a bug in your code that is throwing a
HTML Code:
Parse error: parse error in.../wp-content/themes/atahualpa/404.php on line 19
In the
HTML Code:
_e( 'Maybe try a search?', );
If you are not going to specify the domain to retrieve the translated text, you need the line to be
HTML Code:
_e( 'Maybe try a search?', '' );
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
|