Hi
I have a member site and the top navigation changes to another menu when the user is logged-in to the member site and changes back when they log-out.
I upgraded my theme and the control of the change of menu has been affected. It is now small and left justified. There was also a minor bug when I was loved in as admin the correct top nab did not show in full 2 items were not there.
Can someone make the changes for me. so that the admin or a user can login and log out and the menu is the correct size (also that I can change the colour and size at a future date...if the number of menu items don't fit ...ie.e I add more stuff).
The code for the header.php.
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php theme_generator('title'); ?></title>
<?php if($custom_favicon = theme_get_option('general','custom_favicon')) { ?>
<link rel="shortcut icon" href="<?php echo $custom_favicon; ?>" />
<?php } ?>
<?php if ( function_exists( 'get_sliding_panel' ) ) get_sliding_panel(); ?>
<!-- Feeds and Pingback -->
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS2 Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
<!--[if IE 6 ]>
<link href="<?php echo THEME_CSS;?>/ie6.css" media="screen" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<?php echo THEME_JS;?>/dd_belatedpng-min.js"></script>
<script type="text/javascript" src="<?php echo THEME_JS;?>/ie6.js"></script>
<![endif]-->
<!--[if IE 7 ]>
<link href="<?php echo THEME_CSS;?>/ie7.css" media="screen" rel="stylesheet" type="text/css">
<![endif]-->
<!--[if IE 8 ]>
<link href="<?php echo THEME_CSS;?>/ie8.css" media="screen" rel="stylesheet" type="text/css">
<![endif]-->
<!--[if IE]>
<script type="text/javascript" src="<?php echo THEME_JS;?>/html5.js"></script>
<![endif]-->
<?php
if(theme_get_option('cufon','enable_cufon')){
theme_add_cufon_code();
}
?>
<script type="text/javascript">
var image_url='<?php echo THEME_IMAGES;?>';
</script>
<?php
if(theme_get_option('general','analytics') && theme_get_option('general','analytics_position')=='header'){
echo stripslashes(theme_get_option('general','analytics'));
}
?>
</head>
<body <?php body_class(); ?>>
<header id="header">
<div class="inner">
<div align="right">
<?php if(theme_get_option('general','display_logo') && $custom_logo = theme_get_option('general','logo') ):
?>
<div id="logo">
<a href="<?php echo home_url( '/' ); ?>"><img class="ie_png" src="<?php echo $custom_logo; ?>" alt="<?php bloginfo('name'); ?>"/></a>
<?php if(theme_get_option('general','display_site_desc')){
$site_desc = get_bloginfo( 'description' );
if(!empty($site_desc)):?>
<div id="site_description"><?php bloginfo( 'description' ); ?></div>
<?php endif;}?>
</div>
<?php else:?>
<div id="logo_text">
<a id="site_name" href="<?php echo home_url( '/' ); ?>"><?php bloginfo('name'); ?></a>
<?php if(theme_get_option('general','display_site_desc')){
$site_desc = get_bloginfo( 'description' );
if(!empty($site_desc)):?>
<div id="site_description"><?php bloginfo( 'description' ); ?></div>
<?php endif;}?>
</div>
<?php endif; ?>
<?php $top_area_type = theme_get_option('general','top_area_type');
switch($top_area_type){
case 'html':
if(theme_get_option('general','top_area_html')){
echo '<div id="top_area">';
echo str_replace(array('[raw]','[/raw]'),'',do_shortcode(wpml_t(THEME_NAME, 'Top Area Html Code', stripslashes( theme_get_option('general','top_area_html') ))));
echo '</div>';
}
break;
case 'wpml_flags':
theme_generator('wpml_flags');
break;
case 'widget':
echo '<div id="top_area">';
dynamic_sidebar(__('Header Widget Area','striking_admin'));
echo '</div>';
break;
}
if ( Dap_Session::isLoggedIn() || is_admin() || is_user_logged_in() ) {
wp_nav_menu(array(
'theme_location' => 'logged-in-menu',
'container' => 'nav',
'container_id' => 'members_menu',
'container_class' => 'jqueryslidemenu',
'fallback_cb' => ''
));
} else {
theme_generator('menu');
}
?>
</div>
</header>
Francisco Javier Carazo Gil answers:
Hi Bookinars,
Your structure is clear, two different menus:
* logged-in-menu
* menu
With this code I can't help you. Please provide us a URL to see wich class and CSS is affected.
Bookinars comments:
www.socialmediainbusiness.com
thanks
Francisco Javier Carazo Gil comments:
Thanks,
But there is a problem. I need access to member part because you generate your menu in server-side so I can't see exactly wich classes are having problems.
You can send me via PM a login to try.
Bookinars comments:
Hi No problem just sign up it is free to sign up you just need to give name and email and I can delete it when your finished
Francisco Javier Carazo Gil comments:
Ok, perfect, go.
I haven't noticed it was free.
Francisco Javier Carazo Gil comments:
Bookinars,
The problem is the id of the menu: "navigation" works, "members-menu" not.
Francisco Javier Carazo Gil comments:
Change:
if ( Dap_Session::isLoggedIn() || is_admin() || is_user_logged_in() ) {
wp_nav_menu(array(
'theme_location' => 'logged-in-menu',
'container' => 'nav',
'container_id' => 'members_menu',
'container_class' => 'jqueryslidemenu',
'fallback_cb' => ''
));
To:
if ( Dap_Session::isLoggedIn() || is_admin() || is_user_logged_in() ) {
wp_nav_menu(array(
'theme_location' => 'logged-in-menu',
'container' => 'nav',
'container_id' => 'navigation',
'container_class' => 'jqueryslidemenu',
'fallback_cb' => ''
));
It should works.
Manoj Raj answers:
The problem is that you have no style created for "members-menu".. You have styled the container id "navigation" in a way to display on right..
Just change
'container_id' => 'members_menu',
to
'container_id' => 'navigation',
It will work..
Albert Shala answers:
Please provide a link, It sounds like it's more of a css question but can't say for sure until I can see a working demo of the site in question. Thanks.
Bookinars comments:
www.socialmediainbusiness.com
Is this what you mean?
Gabriel Reguly answers:
Hi Bookinars,
I have solved this before, but was told that there was an update and changes were lost.
--Edit: This was the original question: [[LINK href="http://wpquestions.com/question/showLoggedIn/id/3404"]]http://wpquestions.com/question/showLoggedIn/id/3404[[/LINK]]
Id members_menu should be defined at CSS file themes/striking/css/screen.css, at line 1782
#members_menu {
right: -15px;
bottom: 0;
position: absolute;
height: 60px;
font-size: 42px;
}
#members_menu a:link,
#members_menu a:visited,
#members_menu a:hover,
#members_menu a:active,
#members_menu a:focus {
color: #666666;
}
Also don't forget that the menu entries should be created.
Regards,
Gabriel