Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 30th Sep 2011, 01:40 PM   #1
Warrior Member
 
Join Date: 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
Default
I want To Redirect All my post under one Category to URL
Share on: 
fb share twitter share gplus share more share

Hi Experts,
I want to redirect my whole post which are in single category to One Single URL.
Eg:
100 Post under Category "a" i want to redirect all of them to one url.
just Like this i have 5 - 8 categories.
Please suggest me the Best plugin or Hack for this .


Thanks in Advance
Regards,
Ellero
Ellero is offline  
Unread 30th Sep 2011, 11:01 PM   #2
HyperActive Warrior
 
unnatural's Avatar
 
Join Date: 2011
Location: Edmonton, Alberta
Posts: 120
Thanks: 0
Thanked 25 Times in 23 Posts
Default
Re: I want To Redirect All my post under one Category to URL
Share on: 
fb share twitter share gplus share more share

Put this code on the top of your post.php page (or whatever page is handling your single posts).

<?php

if (is_category( 'your-category-slug-or-id-here' )) {
header("Location: http://the-url-you-want-to-redirect-to.com");

}

?>
unnatural is offline  
Unread 1st Oct 2011, 01:02 AM   #3
Warrior Member
 
Join Date: 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
Default
Re: I want To Redirect All my post under one Category to URL
Share on: 
fb share twitter share gplus share more share

Thanks But i want to Redirect all post which are under single category to single URL
Ellero is offline  
Unread 1st Oct 2011, 02:29 AM   #4
Warrior Member
 
Join Date: 2011
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: I want To Redirect All my post under one Category to URL
Share on: 
fb share twitter share gplus share more share

I need the id of this category and put it in the code which unnatural gave you

katsar0v is offline  
Unread 1st Oct 2011, 12:29 PM   #5
HyperActive Warrior
 
unnatural's Avatar
 
Join Date: 2011
Location: Edmonton, Alberta
Posts: 120
Thanks: 0
Thanked 25 Times in 23 Posts
Default
Re: I want To Redirect All my post under one Category to URL
Share on: 
fb share twitter share gplus share more share

Originally Posted by Ellero View Post

Thanks But i want to Redirect all post which are under single category to single URL
That's exactly what that code does, just replace the category with your own category id, slug or name and replace the URL that you want to redirect too.
unnatural is offline  
Unread 1st Oct 2011, 06:46 PM   #6
Watching you...
War Room Member
 
Istvan Horvath's Avatar
 
Join Date: 2008
Location: Waterdown, Ontario, Canada
Posts: 8,208
Thanks: 2,059
Thanked 3,699 Times in 2,243 Posts
Blog Entries: 2
Default
Re: I want To Redirect All my post under one Category to URL
Share on: 
fb share twitter share gplus share more share

I want to redirect my whole post which are in single category to One Single URL.
Eg:
100 Post under Category "a" i want to redirect all of them to one url.
That doesn't make much sense...

You mean nobody will be able to read any of the 100 posts - because all of them will be redirected to some other URL.

Then why the heck to have 100 posts?

Istvan Horvath is offline  
Unread 3rd Oct 2011, 07:37 PM   #7
Software/Database Expert
War Room Member
 
gtownfunk's Avatar
 
Join Date: 2011
Location: Austin, TX
Posts: 75
Thanks: 47
Thanked 24 Times in 21 Posts
Default
Re: I want To Redirect All my post under one Category to URL
Share on: 
fb share twitter share gplus share more share

Well, it depends if some of those posts have serious link juice coming in or are getting some real traffic on their own. People will click away if they don't get what they're looking for.. but..

I have heard of strategies to kickstart google into indexing a new website by redirecting other pages to it (passing on the juice/PR) and then putting everything back to normal.

It's not always good to kill the URLs, IMHO.

gtownfunk
gtownfunk is offline  
Closed Thread


Bookmarks

Tags
category, post, redirect, url


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 06:54 PM.