![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Center of the Universe
Posts: 2,758
|
Wordpress Gurus I need help-register to read more
I have stayed away from GFY because it has turned into a turd palace polico forum. It is the best place I know when I really need wordpress help so here goes.
I am looking for a very simple way to redirect guest users to a register page when they click "read more". Everything I have found is some bloated membership plugin with lots of shit I just dont need. Anyone know of a simple hack or easy plugin that will handle this? thanks in advance
__________________
AlanAgus1 at gmail dot com -------------------------------
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,381
|
You mean when he tries to view a full article, right?
__________________
Obey the Cowgod |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Center of the Universe
Posts: 2,758
|
yeah,
great software you sell BTW
__________________
AlanAgus1 at gmail dot com -------------------------------
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,381
|
The easiest way to do it is: put this code into header.php of your WP theme:
Code:
if (!is_user_logged_in() && is_singular('post')) { if (wp_redirect('http://www.gfy.com/')) { exit; } } There is one problem, however. The search engines will not be able to see the full articles too. Course it's not a problem to make an additional check to find out if it's an SE bot or a human, to perform redirect for human surfers only, but I guess that search engines will consider it as cloaking which is a black SEO method... So alternatively you can use this code: Code:
if (!is_user_logged_in() && strpos(wp_remote_request(), '#more') !== false) { if (wp_redirect('http://www.gfy.com/')) { exit; } }
__________________
Obey the Cowgod |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Center of the Universe
Posts: 2,758
|
Awesome..... works like a charm! And anyone looking to automate a network check out cyberseo's product. Not many scripts I have ever bought that I would recommend to a friend, but this is one of them. Not sucking up, but it's truly useful
__________________
AlanAgus1 at gmail dot com -------------------------------
|
![]() |
![]() ![]() ![]() ![]() ![]() |