Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6602337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:51:53+00:00 2026-05-25T18:51:53+00:00

I have made a public account in wordpress which I will send to 100

  • 0

I have made a public account in wordpress which I will send to 100 users.

So the login would be:

Username: public
Password: 123example

The only thing I want is to hide the profile page for this specific user account so they can’t change password, emailadress, etc.

How to achieve this? Maybe change some php?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:51:53+00:00Added an answer on May 25, 2026 at 6:51 pm

    this script cover all the aspects of the question, read the code comments for further explanation.

    <?php
    /**
     * this make sure the public user where redirected
     * to home instead of profile page
     */
    function redirect_user_to($redirect_to, $request, $user)
    {
      global $user;
      if ($user->user_login == 'public') {
        return home_url();
      }
      else {
        return home_url("/wp-admin/");
      }
    }
    add_filter('login_redirect', 'redirect_user_to', 10, 3);
    
    /**
     * this remove the profile links from
     * the top nav menu
     */
    function remove_edit_profile()
    {
      global $wp_admin_bar, $current_user;
      get_currentuserinfo();
      if ($current_user->user_login == 'public') {
        $wp_admin_bar->remove_menu('edit-profile');
        $wp_admin_bar->remove_menu('my-account-with-avatar');
        $wp_admin_bar->remove_menu('my-account');
      }
    }
    add_action('wp_before_admin_bar_render', 'remove_edit_profile', 0);
    
    /**
     * this remove the "Site Admin" link from
     * the WP meta widget, usually placed in
     * the side bar.
     */
    function my_unregister_widgets()
    {
      unregister_widget('WP_Widget_Meta');
      register_widget('MY_Widget_Meta');
    }
    add_action('widgets_init', 'my_unregister_widgets');
    
    class MY_Widget_Meta extends WP_Widget
    {
    
      function MY_Widget_Meta()
      {
        $widget_ops = array(
          'classname' => 'widget_meta',
          'description' => __("Log in/out, admin, feed and WordPress links"),
        );
        $this->WP_Widget('meta', __('Meta'), $widget_ops);
      }
    
      function widget($args, $instance)
      {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']);
        echo $before_widget;
        if ($title) {
          echo $before_title.$title.$after_title;
        }
        ?>
                        <ul>
                        <?php
            global $current_user;
        get_currentuserinfo();
        if ($current_user->user_login == 'public') {
        }
        else {
          wp_register();
        }
        ?>
    <li>
    <?php wp_loginout();?>
    </li>
    <li>
    <a href="<?php bloginfo('rss2_url');?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0'));?>">
        <?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>');?></a>
    </li>
    <li>
    <a href="<?php bloginfo('comments_rss2_url');?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS'));?>">
        <?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>');?></a>
    </li>
    <li>
    <a href="http://wordpress.org/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.'));?>">WordPress.org</a>
    </li>
    <?php wp_meta();?>
    </ul>
            <?php
                    echo $after_widget;
      }
    }
    
    /**
     * this prevent from non authorized user ( public )
     * to pointing to the profile page by writing into
     * the address bar.
     */
    function force_profile_redirect()
    {
      global $pagenow, $current_user;
      if (strtolower($current_user->user_login) == 'public') {
        wp_redirect(home_url());
      }
    }
    add_action('admin_init', 'force_profile_redirect');
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made this controller, which should be used to send emails. I need
I have made an iphone application like flip cards in which values of cards
I have made my own exception class which derives from runtime_error and is getting
I have made an application which is using GCM push messaging framework for getting
I have made an JSR 168 portlet as follows: public class GetTest extends GenericPortlet
I made an ATM program. I have a try catch that will ask for
I'm coding a simple Bank simulator where users would login from different locations at
I have recently been put in charge of debugging two different programs which will
I have made a jQuery toggle for a menu that I had in mind.
I have made an application for IPad in objective C. In this I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.