I am a WordPress newby.
So far, it has been very easy to use WP to replace my self-made code used to manage users' login, write and output posts and static pages in 3 of my existing websites. I did it by installing WP in its own directory, by adding one exception to my .htaccess' mod_rewrite rules and by creating a blank vanilla theme. I have to and do include:
<?php require($_SERVER['DOCUMENT_ROOT'] . '/wp/wp-load.php'); ?>
in every page in order to have access to WP functions.
Everything works fine and better than it did with my outdated dirty solutions.
Now, I was hoping to leverage WP a bit more by customizing its admin-bar and replace the one I currently use. But I am not able to have the admin toolbar showing on my pages.
My test page looks like this:
<?php require($_SERVER['DOCUMENT_ROOT'] . '/wp/wp-load.php'); ?>
<html>
<head><?php wp_head(); ?></head>
<body>
<?php
echo"<pre>";print_r($current_user);echo"</pre>";
wp_footer();
?>
</body>
</html>
I know I can use WP funtions and login is successful because as I can display logged user info.
in functions.php I also have alternated, without luck, all permutations of:
add_filter( 'show_admin_bar', '__return_true' , 1000 );
and
show_admin_bar( true );
it shouldn't matter anyway because in my account setting page, "Show Toolbar when viewing site" is checked and I can see that in the table wp_usermeta, the key show_admin_bar_front is set to true.
also, if I use:
<?php require($_SERVER['DOCUMENT_ROOT'] . '/wp/wp-blog-header.php'); ?>
instead of
<?php require($_SERVER['DOCUMENT_ROOT'] . '/wp/wp-load.php'); ?>
I still don't get the admin toolbar, but my page return a 404 header.
I do not have any plug-in installed.
any help will be greatly appreciated.
thank you! M<