Problem with functions.php – urgent help needed!

  • Author
    Posts
  • #4359
    AdamJames

    Help!  I wanted to hide the WP admin bar at the top of the webpages … I found some help on WP.org, which advised to drop a line of code into the functions.php file.

    I did so, but it didn’t work, and there was a disastrous side effect – I couldn’t navigate back into my admin area, or log out of the public website – I kept getting re-directed to a blank page.

    I’ve deleted the new line of code, and re-saved the settings in functions.php, so it SHOULD be back to normal … BUT IT ISN’T!  The problems remain.

    I’m no programming genius.  I don’t know what to do.  But I have a horrible feeling …

    The current contents of my functions.php file are as follows.  Can anyone either (a) suggest changes to bring normality back, or (b) advise how else to restore normal functions?

    thanks!

    <?php
    /*
    * Functions file
    * Includes all necesary files
    * PLEASE DO NOT EDIT THIS FILE IN ANY WAY
    *
    * @package mantra
    */

    require_once(dirname(__FILE__) . “/admin/main.php”); // Load necessary admin files

    //Loading include fiels
    require_once(dirname(__FILE__) . “/includes/theme-setup.php”); //Setup and init theme
    require_once(dirname(__FILE__) . “/includes/theme-styles.php”); //Register and enqeue css styles and scripts
    require_once(dirname(__FILE__) . “/includes/theme-loop.php”); //Loop related fiels
    require_once(dirname(__FILE__) . “/includes/theme-seo.php”); //SEO related fiels
    require_once(dirname(__FILE__) . “/includes/theme-frontpage.php”); //Frontpage generation
    require_once(dirname(__FILE__) . “/includes/theme-comments.php”); //Theme comment functions
    require_once(dirname(__FILE__) . “/includes/theme-shortcodes.php”); //Theme shortcodes
    require_once(dirname(__FILE__) . “/includes/theme-functions.php”); //Theme misc functions
    require_once(dirname(__FILE__) . “/includes/theme-hooks.php”); //Theme hooks

    ?>

     

    #4361
    AdamJames

    Okay, in the end I just deactivated, deleted, and uploaded the latest version of Mantra, which SEEMS to have overwritten functionality back to normal.

    I saved screenshots of my settings … next time I’ll just export Mantra settings before doing anything ambitious.

    There’s still the question of how to (safely) hide the WP admin bar, if anyone has a suggestion …

    #4373
    Zed
    Cryout Creations mastermind

    Users > Your Profile, uncheck “Show Toolbar when viewing site” 😉


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #4488
    AdamJames

    Thanks Zed … though I was trying to hide the bar from users, whilst making it available to myself.

    In the end I found the admin-bar-disabler plug-in, which did just that …

     

    #4568
    Zed
    Cryout Creations mastermind

    The admin bar is ONLY visible to authenticated users, so your visitors will never see it.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Problem with functions.php – urgent help needed!’ is closed to new replies.