Title: Stefan's Replies | WordPress.org

---

# Stefan

  [  ](https://wordpress.org/support/users/webcam/)

 *   [Profile](https://wordpress.org/support/users/webcam/)
 *   [Topics Started](https://wordpress.org/support/users/webcam/topics/)
 *   [Replies Created](https://wordpress.org/support/users/webcam/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/webcam/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/webcam/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/webcam/engagements/)
 *   [Favorites](https://wordpress.org/support/users/webcam/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename wp-login.php] is_admin() and OOP](https://wordpress.org/support/topic/is_admin-and-oop/)
 *  Thread Starter [Stefan](https://wordpress.org/support/users/webcam/)
 * (@webcam)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/is_admin-and-oop/#post-4313271)
 * ok.
 * create a php file “class.php”, insert something like ( `class fun {}` )
 * in your functions.php, add:
 * `if( !is_admin() ) { include('class.php'); }`
 * open your 404.php, add:
 * `$fun = new fun();`
 * now, try your 404 while type [http://www.example.com/xxxx](http://www.example.com/xxxx)(
   not existing page), into your browser: your 404 will show up correctly.
 * now log off and type [http://www.example.com/wp-admin/](http://www.example.com/wp-admin/)
   into your browser:
 * 404 shows up, but with an error like “cannot find class “fun”. because /wp-admin**
   actually is** “is_admin();
 * its a stupid example, but i hope u’ll see what i mean. 🙂
 * ———-
 * second thought on the 404 problem. If you have a multisite installed, user can
   be added via the backend in several ways. they will retrieve some confirmation
   mails – with the wrong url in it (/wp-admin).
 * because we can’t change the admin_url, i’ve added into your rwl_404() function:
 *     ```
       if (
           isset( $_SERVER['HTTP_REFERER'] ) &&
          (     strpos( $_SERVER['HTTP_REFERER'], 'newbloguser' ) !== FALSE
            || strpos( $_SERVER['HTTP_REFERER'], 'wp-activate.php' ) !== FALSE )
         ) {
   
            wp_redirect( rwl_login_url() );
            exit;
   
       }
       ```
   
 * i know, this is not save, but at the moment, the best solution. so user wont 
   land on a 404 page, if they click the login link.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Yet Another Related Posts Plugin] “related_posts_exist” won´t work](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-related_posts_exist-wont-work/)
 *  Thread Starter [Stefan](https://wordpress.org/support/users/webcam/)
 * (@webcam)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-related_posts_exist-wont-work/#post-814015)
 * hey mitcho!
 * thx for your advance..
 * but it also won´t work with your dev build version….
 * i know the workarround in the option page, but its almost not so gentle because
   i don´t want to show the whole headline “related posts:”, if there are no related
   posts -> this is not possible to conf in the option page.
 * It´s a pity. 🙁
 * but thx again for your fast and great help!

Viewing 2 replies - 1 through 2 (of 2 total)