Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter webfixnow

    (@webfixnow)

    The purpose of adding it to the core files is to override any theme used so that when switching between themes one would not have to modify each themes code.

    After some extensive testing it seems that this location is not ideal because of the use of code in WP that uses header(); in some of the PHP files for redirection and in some cases causes a PHP error that headers cannot be modified because OUTPUT was already started.

    It is better to modify the header.php within each themes folder that you use to include the following code at the very top of the file:

    <?php
    if (!is_user_logged_in()) {
    	echo "<style type='text/css'>
    	#wpadminbar { display:none !important;}
    	html { margin-top: 0px !important; }
    	* html body { margin-top: 0px !important; }
    	</style>";
    }
    ?>

    I have tested the above with logging in and out, posting, etc, all without errors.

    Thread Starter webfixnow

    (@webfixnow)

    Sorry, correction to title made. Login bar or WP dubbed “Toolbar.”

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