Jump to content
Sign in to follow this  
spencerbrasfield

How To Change 404 Message

Recommended Posts

spencerbrasfield

How do I change the default 404 message? Thank you.

Share this post


Link to post
Share on other sites
spencerbrasfield
I followed the skeleton directions given at the link you gave, but it did not work. I copied the file (section.noposts.php) from Pro and pasted it into the sections directory within Base. Then, I changed the wording of the "404!" message, saved, and uploaded the new file to my web server. Again, it did not work. Are there addition steps that should be taken? Thank you.

Share this post


Link to post
Share on other sites
spencerbrasfield
To be more clear, I am receiving a "syntax error on line 45" message. I can't imagine what that might be, so here is the entire template.noposts.php file: 'main', 'description' => 'Shows 404 error to users.', 'workswith' => array('404'), 'folder' => 'wp', 'required' => true, 'init_file' => 'noposts' ); parent::__construct($name, $id, $settings); } function section_template() { ?>

of "Special Post Types" Not Available... Yet','pagelines');?>

"features" or "boxes" isn't unavailable. This WordPress functionality is new and rapidly developing, so it should be available soon.', 'pagelines');?>


Share this post


Link to post
Share on other sites
Simon
Sorry can you post it to pastebin or pastie, that will keep the line numbers intact and add syntax highlighting.

Share this post


Link to post
Share on other sites
spencerbrasfield
Still didn't work. I pasted the contents of the sections.noposts.php file to pastebin and then downloaded that file, saving it in the Base directory as template.noposts.php. The website still shows a syntax error. Am I missing something?

Share this post


Link to post
Share on other sites
kastelic
Read carefully the paragraph in the docs with the heading Overriding Section Templates (at the bottom) You will be making a file called template.noposts.php and only copying the contents of the main function from the original section.noposts.php.

Share this post


Link to post
Share on other sites
spencerbrasfield
I keep jumping through all the hoops but it its not working. I am still receiving a syntax error ??” this time on line 33. The syntax error says "unexpected } on line 33". If I delete the bracket on line 33, I then receive another syntax error saying "unexpected } on line 31". So that you can see the entire file, here is the new template.noposts.php file in full.

of "Special Post Types" Not Available... Yet','pagelines');?>

"features" or "boxes" isn't unavailable. This WordPress functionality is new and rapidly developing, so it should be available soon.', 'pagelines');?>


Share this post


Link to post
Share on other sites
Rob
Spencer, this part of your code looks incorrect to me. It appears to open a PHP tag, but then closes scripts after opening the new PHP.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×