请尝试以下代码:
<html>
<head>
<script type="text/javascript" src="wp-includes/js/admin-bar.js"></script>
<link rel="stylesheet" type="text/css" href="wp-includes/css/admin-bar.css">
</head>
<body>
<?php
require_once( dirname(__FILE__) . \'/wp-load.php\' );
wp_admin_bar_render();
?>
</body>
</html>