Jump to content
Sign in to follow this  

Custom 404 Page or Redirect [Platform Pro] [Part II]

Recommended Posts


I'm reopening this topic because it was closed without an actual answer in this thread: http://www.pagelines.com/forum/topic.php?id=6173 I wrote, in the first post:

I have the redirection plugin set up, but I couldn't figure out how to use it to redirect 404 error pages.
This was the response that closed the topic:
Then under Tools > Redirection you can set 404 errors to redirect to your newly created page. Couldn't be easier or better.
It's possible that I'm just completely missing how to use this plugin to catch all 404 errors...but if I can't figure it out I assume that other people can't either. I can see why this would get chalked up to a non-Pagelines issue, and that you might think you're wasting your time by helping out on a "plugin" problem. But since Pagelines doesn't yet offer simple customization of the 404 error page, this is apparently the best solution. The rest of the threads with half solutions can be found here: http://www.pagelines.com/forum/tags.php?tag=404 If I'm just being an idiot that can't figure out this plugin, fine. I'll take it. But before closing a topic, wouldn't it be better to give a real answer...maybe say what to put here, so that we can redirect 404-errors to a custom page? 2RHAx.png

Share this post

Link to post
Share on other sites

@anvilmediainc What 404 plugin are you using? I am using Smart 404 with good success on this website. This is not a Platform Pro site it is done with Thesis the other framework I use. Here is an example 404 page. I used hooks to accomplish this. Things work differently with Thesis but this code could be modified to work:

function custom_thesis_404_title() {
	I know I put that page around here somewhere!
	remove_action('thesis_hook_404_title', 'thesis_404_title');
	add_action('thesis_hook_404_title', 'custom_thesis_404_title');
	function custom_thesis_404_content() {
	<?php if (smart404_loop()) : ?>
	<h2>Perhaps one of these pages is what you were looking for:</h2>
	<?php while (have_posts()) : the_post(); ?>
	title="<?php the_title_attribute(); ?>">
	<?php the_title(); ?></h4>
	  <small><?php the_excerpt(); ?></small>
	<?php endwhile; ?>
	<?php endif; ?>
	<p>  </p>
			<h2>You could try searching</h2>
		<p>Use the search box below to search with keywords.</p>
		<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
			<input size="55" type="text" class="full" value="Search <?php bloginfo('name'); ?> - Type & hit enter" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" name="s" id="s" />
	    <h2>My most recent posts:</h2>
<?php } remove_action('thesis_hook_404_content', 'thesis_404_content'); add_action('thesis_hook_404_content', 'custom_thesis_404_content'); [/code]

It looks to me in Platform Pro you would use a custom section.

Share this post

Link to post
Share on other sites

@Caroline -- thanks for the rundown. I've decided to not use a 404 plugin (although I looked at Smart 404 also). I posted this thread because the advice for Platform Pro 404 error page customization has basically been: "Use the Redirection plugin to redirect your 404 errors to a page you create within Wordpress. It's super easy and awesome, you'd be a moron to try anything else!" "Cool! How do I set this plugin up to redirect my 404 error pages?" "..." Of course I'm paraphrasing.

Share this post

Link to post
Share on other sites

@anvilmediainc, I hear your frustration. Communication on a forum is difficult. I have experienced that responders to posts don't always read through each post to discern the best answer fit. I've also experienced frustration when having a post "closed" when questions are still hanging. Until this forum is updated with better structure for topic refinement, we've got to roll with the system and keep trying to find our own solutions. Right now, I think that the moderators are a little overwhelmed with the type of questions that are coming at them and their doing the best they can to keep up with all the different developments under way. Clarity of communication is no easy task to obtain. I haven't tried to tackle a custom 404 yet, but thanks for leading and sharing your experiences. If I make any improvements before you find a solution, I will post them. Cheers, Dustin

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