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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-28-2017, 05:05 AM   #1
charlie g
Confirmed User
 
charlie g's Avatar
 
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
-------------------------------
charlie g is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-28-2017, 05:17 AM   #2
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,342
Quote:
Originally Posted by charlie g View Post
to redirect guest users to a register page when they click "read more"
You mean when he tries to view a full article, right?
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-28-2017, 05:32 AM   #3
charlie g
Confirmed User
 
charlie g's Avatar
 
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
-------------------------------
charlie g is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-28-2017, 05:35 AM   #4
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,342
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;
    }
}
The code must be placed right after the first "<?php" line in header.php (before "<!DOCTYPE html>" or any other HTML code). Just make sure to replace 'http://www.gfy.com/' with URL of your login/registration page.

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;
    }
}
It won't block search engines from crawling your full-text pages, but it won't block your surfers from visiting them too, if the post URL is opened in the browser directly. The redirect trick will work only in case if a surfer has clicked "read more".
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-28-2017, 06:49 AM   #5
charlie g
Confirmed User
 
charlie g's Avatar
 
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
-------------------------------
charlie g is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
plugin, wordpress, simple, read, bloated, membership, page, register, click, found, handle, advance, easy, shit, users, hack, lots, turd, polico, palace, gfy, help-register, gurus, stayed, forum
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.