Ready to get started?Download WordPress


Role Scoper
Redirect to a specific WordPress page instead 404 (5 posts)

  1. simbian
    Posted 1 year ago #

    Hello, im using the plugin and i noticed it works nice, however i ask it's normal that the users that don't have the reading/view privilege about a restricted WordPress page see the 404 page? It's possible to show a specific WordPress page instead?



  2. Loc Huu Ho
    Posted 1 year ago #

    Hi I was wondering about this too. Anyone can give advice on this topic?

  3. simbian
    Posted 1 year ago #

    Maybe there isn't a solution to fix this?

  4. simbian
    Posted 1 year ago #

    i tried with this code

    	global $wpdb;
    	$post_id = 30;
    	$post_exists = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE id = '" . $post_id . "'", 'ARRAY_A');
    	  echo 'Sorry, you do not have permission to view this page.';
    	} else {
    	  echo 'Sorry but the page you are looking for cannot be found.';

    but this doesn't solve the problem because it just checks if the post exists and it shows the proper message, anyway the post always exists.

  5. kevinB
    Plugin Author

    Posted 7 months ago #

    There is no support for redirecting to an arbitrary page, but if you enable Roles > Options > Features > Hidden Content Teaser, you can specify a custom denial message (including html if desired) for each post type.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic