Admin User Accidentally Disabled Access to WP Dashboard

I enabled the option to hide the WP admin and I am now completely locked out of my site. Is there a way to disable this particular plugin setting? This is the script error that I receive when attempting to access the WP admin dashboard:

Fatal error: Call to a member function get_queried_object_id() on a non-object in /home/ace4weavers4/public_html/staging/wp-includes/query.php on line 57

Thanks

  • Milan

    Greetings @Niraj,

    Welcome to WPMU DEV.

    I hope you are having a good day and thanks for the asking. :slight_smile:

    Unfortunately this error may be thrown by other plugins too, so it is very difficult to troubleshoot which plugin is causing this issue. Would you please disable all the plugins via ftp and then one by one activate it so it will be easier to pick which plugin is causing issue ?

    Please login to your host account via ftp. Then navigate to wp-content/ directory, rename plugins folder to plugins-old, and then create another plugin folder in that directory.

    After doing this please try to access your wordpress admin panel. Can you access it now ?

    Let me know how it goes for you.

    Best Regards,
    Milan Savaliya.

  • Milan

    Hello @Niraj,

    I hope you are having a good day and thanks for the asking. :slight_smile:

    If you are sure it's our Ultimate branding plugin then would you please navigate to /wp-content/plugin/ultimate-branding folder on your host with frp credentials. Then just rename plugin like "ultimate-branding" to "ultimate-branding-test". After doing this try to access your site.

    Let me know how it goes for you.

    Best Regards,
    Milan Savaliya.

  • Milan

    Hello @Niraj,

    I hope you are having a good day. Glad to know that you can access your site now. :slight_smile:

    To reset ultimate branding to its initial state you requires database credentials of your site. Once you have database credentials please do follow below steps to reset ultimate branding plugin via database. :slight_smile: Please note that I've used phpmyadmin tool to explain below steps, but you can use any other tool of your preference.

    #1) Login to your database. Find table named "wp_options". You need to fire below sql query against database to fetch row which stores information about currently activated modules.

    SELECT * FROM wp_options WHERE option_name LIKE 'ultimatebranding_activated_modules';

    #2) After firing above query against database you will see one row listed out. Update value of column name "option_value" to "a:0:{}" of that row. If you are using phpmyadmin for managing database then double click on value column will put you in edit mode.

    #3) After updating value, fire above query again and make sure that value of column name "option_value" is set to "a:0:{}".

    #4) Once you do this please navigate back to your wp-contents/plugins/ultimate-branding-old and rename that folder to ultimate-branding. You'll require ftp credentials to do so.

    That's it. :slight_smile:

    Dear @Niraj above database operation will disable all the modules of ultimate branding plugin which were activated when your sites gets crashed.

    I hope this helps you.

    Please let me know if there is anything else I can help you with.

    Best Regards,
    Milan Savaliya.

  • Niraj

    One more things...
    Not sure if this is a bug or an error on my part, but below are my current settings which work jus fine:

    a:12:{s:15:"login-image.php";s:3:"yes";s:21:"custom-email-from.php";s:3:"yes";s:31:"remove-wp-dashboard-widgets.php";s:3:"yes";s:25:"global-footer-content.php";s:3:"yes";s:25:"rebranded-meta-widget.php";s:3:"yes";s:21:"admin-footer-text.php";s:3:"yes";s:25:"site-wide-text-change.php";s:3:"yes";s:12:"favicons.php";s:3:"yes";s:17:"admin-message.php";s:3:"yes";s:28:"custom-dashboard-welcome.php";s:3:"yes";s:30:"site-generator-replacement.php";s:3:"yes";s:25:"global-header-content.php";s:3:"yes";}

    After getting this far in terms of changes, if I now attempt to enable the "Admin Help Content" option, I get the following error:

    Fatal error: Call to a member function get_queried_object_id() on a non-object in /home/ace4weavers4/public_html/staging/wp-includes/query.php on line 57

    Please advise as to what the issue might be?

    Thanks

  • Milan

    Hello @Niraj,

    I am glad that solution helped you to access your site.

    Let me go bit by bit to answer your question. :slight_smile:

    Which setting changes the wordpress logo that is in the top left of the WP dashboard?

    Unfortunately at this moment there isn't any options available for this change, However you can apply another way around to achieve this. First you can hide that menu then add new menu and specify image url which you would like to display user, then add submenu items as you need to that menu. All of functionality you need to apply this way provided by custom admin bar addon.

    After getting this far in terms of changes, if I now attempt to enable the "Admin Help Content" option, I get the following error:

    I am sorry but I can't replicate this behaviour on my sandbox site, there must be some other issue, Would you please grant me support staff access so that I can check in depth regarding your issue ?. You can grant me support access via WPMU DEV > Support > Support Access > Grant Access.

    Look forward to hearing back!

    Best Regards,
    Milan Savaliya.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.