How would one go about solving this issue?
Hello all,
I would like to remove the classipress front end tool bar at the top of the screen.
I just don't want it showing pre-login or after login.
Now here is the crux.
I would like an option in the back end classipress settings screen to just switch this ON or OFF.
I have created the admin-values for this and I now have the select boxes for yes and no by using this code within admin-values.php
array( 'name' => __('Disable User Toolbar Frontend','appthemes'),
'desc' => '',
'tip' => __("This will remove the user toolbar at the top of your web site which is displayed for all non logged in users.",'appthemes'),
'id' => $app_abbr.'_remove_frontenduser_toolbar',
'css' => 'width:100px;',
'std' => '',
'vis' => '',
'req' => '',
'
js' => '',
'min' => '',
'type' => 'select',
'options' => array( 'no' => __('No', 'appthemes'),
'yes' => __('Yes', 'appthemes'))),
I would like to now use a hook or something to remove the line of code in red below from the theme-header.php file
<!-- HEADER -->
<div class="header">
<div class="header_top">
<div class="header_top_res">
<p>
<?php echo cp_login_head(); ?>
<a href="<?php if (get_option('cp_feedburner_url')) echo get_option('cp_feedburner_url'); else echo get_bloginfo_rss('rss2_url').'?post_type='.APP_POS T_TYPE; ?>" target="_blank"><img src="<?php bloginfo('template_url'); ?>/images/icon_rss.gif" width="16" height="16" alt="rss" class="srvicon" /></a>
<?php if ( get_option('cp_twitter_username') ) : ?>
|
<a href="http://twitter.com/<?php echo get_option('cp_twitter_username'); ?>" target="_blank"><img src="<?php bloginfo('template_url'); ?>/images/icon_twitter.gif" width="16" height="16" alt="tw" class="srvicon" /></a>
<?php endif; ?>
</p>
</div><!-- /header_top_res -->
</div><!-- /header_top -->
The lines of code below are in the same theme-header.php file
// remove the new 3.1 admin header toolbar visible on the website if logged in
if (get_option('cp_remove_admin_bar') == 'yes')
add_filter('show_admin_bar', '__return_false');
Which obviously removes the admin bar from the back end using the select yes/no option in the classipress/settings/advanced tab.
Is it possible for me to echo a blank value or remove the
<?php echo cp_login_head(); ?> completely using the yes/no switch that I have set up in the admin-values.php file as I mentioned above?
I have tried removing the function cp_login_head using this
// remove front end user login bar
if (get_option('cp_remove_frontenduser_toolbar') =='yes')
remove_action('cp_header' , 'cp_login_head');
like in the method for the admin bar removal (backend) above, but it doesn't seem to work.
Am I on the right track or miles away. I think this is possible but not quite sure.
What do you guys think?
Kind regards
Jason