Menus


Author Message
Sean

Posted: 7/11/2010
Quote message 

I would like to create additional pages in wordpress. I would like the link to some of the pages to appear in the upper menu. I would like the rest to appear in the vertical menu. I do not want repeat page links in either menu. Does anyone have any suggestion on how to do this?
 
Dave Porter

Posted: 7/12/2010
Quote message 

Hi Sean,

You can do this in WP3 - have you looked at the way the new menu's work in the latest version ?

cheers, Dave

 
Sean

Posted: 7/12/2010
Quote message 

Yes, I have. But the page links of the top menu repeat in the vertical menu. I want to have some pages appear in the top menu and others appear in the vertical menu without repeating.

Thanks,


Sean
 
Adam

Posted: 7/12/2010
Quote message 

Artisteer hasn't yet been upgraded to incorporate WP3 menu choices.
 
Kelley Rao

Posted: 7/12/2010
Quote message 

Adding the Toemon's patch, the new menus work fine in 3.0.

For me, I created a menu called top and vertical. Then you decide which items you want to appear in each respective menu. Just learned this myself today, so don't worry...we're all on a learning curve.

Kelley Rao, Webeze
www.web-eze.com
 
Garry

Posted: 7/12/2010
Quote message 

Following plugin may be helpful in adding external links in main menu:

http://wordpress.org/extend/plugins/page-links-to/
 
Kelley Rao

Posted: 7/13/2010
Quote message 

With the new WP 3.0 menus you don't need the page-links-to plugin anymore (nor do you need page-mash). The fewer the plugins the better!

Kelley Rao, Webeze
www.web-eze.com
 
Sean

Posted: 7/13/2010
Quote message 

Kelley,

How were you able to select the items for the top and vertical menu?

Thanks,


Sean

 
Abland

Posted: 7/13/2010
Quote message 

Hi,

For the horizontal menu, Bud has an excellent tutorial on incorporating custom menus:

http://budstechshed.com/make-your-artisteer-menu-compatible-with-wp30/

For the vertical menu, I used Bud's idea and added the following to my theme's functions.php:

function widget_verticalmenu1($args) {
extract($args);
global $artThemeSettings;
$bw = "<div class=\"art-vmenublock\">\r\n <div class=\"art-vmenublock-body\">\r\n";
$bwt = "";
$ewt = "";
$bwc = "<div class=\"art-vmenublockcontent\">\r\n <div class=\"art-vmenublockcontent-body\">\r\n<!-- block-content -->\r\n";
$ewc = "\r\n<!-- /block-content -->\r\n\r\n <div class=\"cleared\"></div>\r\n </div>\r\n</div>\r\n";
$ew = "\r\n <div class=\"cleared\"></div>\r\n </div>\r\n</div>\r\n";
echo $bw;
if ('' != $bwt && '' != $ewt) {
echo $bwt;
_e($artThemeSettings['vmenu.source'], 'kubrick');
echo $ewt;
}
echo $bwc;
?>
<?php wp_nav_menu( array(
'sort_column' => 'menu_order',
'menu_class' => 'art-vmenu',
'title_li' => '<div class="l"></div><div class="r"></div>',
'menu' => 'Low-nav', // this is the name of your menu you created in the menu admin
'link_before' => '<span class="l"></span><span class="r"></span><span class="t">',
'link_after' => '</span>'
) ); ?>
<?php
echo $ewc;
echo $ew;
}

function widget_verticalmenu1_init() {
if ( !function_exists('register_sidebar_widget') ) return;
register_sidebar_widget(array('Vertical menu Low-nav', 'widgets'), 'widget_verticalmenu1');
}

add_action('widgets_init', 'widget_verticalmenu1_init');

This is a copy of the "function widget_verticalmenu" but I just added the "1" in the needed spots to distinguish it. A second menu would be a "2" etc.
It created a widget: "Vertical menu Low-nav" which I can drag to my sidebar. The result is being able to create multiple custom vertical menus.
It's a hack, but works well in site specific designs.
 
Adeptris

Posted: 7/13/2010
Quote message 

Hi Abland,
I tried this same idea, the problem came when I indented menu items, the link_before and link_after is for all levels, so it trys to style the children as top level items and it makes a mess.

WP uses id for the menu item, Artisteer used class, sub-menu in Artisteer is children in WP, then there is active, current_page_ancestor current_page_parent etc: :-@

I have returned the WP nav_menu items to a string, split to an array, deconstructed and reconstructed the lines so they are the same format as artisteer :-(

I thought when I saw your solution I had wasted about 5 hours work :-D

David
 
Abland

Posted: 7/13/2010
Quote message 

Hi, Adeptris,

I noticed that in the horizontal menus, so I edited my style.css by adding:

/*START SUBMENU ADDS*/
.art-menu ul a .t
{
display:block;
text-align: left;
margin: 0;
padding: 0;
}
.art-menu ul a .t, .art-menu ul a:link .t, .art-menu ul a:visited .t, .art-menu ul a:hover .t, .art-menu ul a:active .t, .art-nav ul.art-menu ul span .t, .art-nav ul.art-menu ul span span .t
{
text-align: left;
text-indent: 12px;
text-decoration: none;
line-height: 32px;
color: #EFF2F5;
font-family: Verdana, Geneva, Arial, Helvetica, Sans-Serif;
font-size: 13px;
font-style: normal;
font-weight: normal;
}
.art-menu ul ul a .t
{
margin-left: auto;
}
.art-menu ul li a:hover .t
{
color: #E9ECF1;
border-color: #92A2B9;
background-position: 0 -32px;
text-align: left;
}
.art-menu ul li:hover>a .t
{
color: #E9ECF1;
border-color: #92A2B9;
background-position: 0 -32px;
}
.art-nav .art-menu ul li a:hover span .t, .art-nav .art-menu ul li a:hover span span .t
{
color: #E9ECF1;
}
.art-nav .art-menu ul li:hover>a span .t, .art-nav .art-menu ul li:hover>a span span .t
{
color: #E9ECF1;
}
/*END SUBMENU ADDS*/

This is just a duplicate of the submenu style, except I added the ".t" to each call. I imagine the vertical will operate the same, though I haven't used submenu items yet.
 
Abland

Posted: 7/13/2010
Quote message 

Okay, I've copied everything between:

/* begin VMenuSubItem */

and

/* end VMenuSubItem */

and all instances of "ul.art-vmenu ul" I changed to "ul.art-vmenu ul.sub-menu"

That has taken care of the intial mess with submenus. I'll include the ".t" next to see if that polishes it up.

Getting there :-/
 
rosemary

Posted: 7/13/2010
Quote message 

to sean, abland, and adeptris,

After you've installed Toeman's patch, you don't have to do anything but go into the WP dashboard under appearance > menus, and create and customize exactly the V and H menus you'd like, using either categories or pages.

Don't have to mess with the code at all.

Check out the Toeman thread.

Rosemary


 
Abland

Posted: 7/13/2010
Quote message 

Hi, Rosemary,

It is the long way around, but some folks like to listen to the radio ... and others like to take it apart and put it back together, and then listen to it.

I guess I'm one of the latter :-D
 
Adeptris

Posted: 7/13/2010
Quote message 

@Rosemary,
Toemans patch works with new themes, if you are not wanting to change much then it is good, as you will be able to export aging when the next Artisteer comes out.

I am looking from a different perspective, there are many many Artisteer created themes that have been created and modified a lot.

The patch cannot help these themes, so an upgrade themplate is needed to move these old themes on.

@Abland :-D
I will have something for the vertical menus by the weekend, it is working now but I am going to tidy it up, it has been about 5 hours work so far.

By using the WordPress output to reconstruct the Artisteer output there is no need to change the stylesheet, the main issues are the indented child menu has diferent styles, the parent and child are both marked active if you select a child menu, and then there is the expanding menu item, none, all or top level and children.

David



.
 
Sean

Posted: 7/13/2010
Quote message 

Rosemary,

I tried to patch, but worpress state that my theme only supported one menu. Did not add the patch right?

Thanks

Sean
 
Kelley Rao

Posted: 7/13/2010
Quote message 

If you're not trying to update a legacy (highly modified) theme, what Rosemary says works fine when trying to incorporate both horizontal and vertical menus/pages (with the 3.0 and Toemon's fix).

First, ignore the "only supports one menu" warning.

Then, create a menu called "toplevel" or whatever you like. Tick the items you'd like to appear in this horizontal menu.

Create a new menu called "vertical" and then follow the same course. You may need to rearrange your vertical menu items if you have sub categories -- piece of cake -- thank you very much 3.0!

Now go to your widgets and drag the vertical menu bar over to your side bar. Voila!

I will add that I document every change I make to a theme after I import into WP because these changes (ie. CSS) will not be reflected when you import your new theme (I leave the old theme intact for reference). I'm also someone that makes changes via FTP to my CSS and also directly to the WP files. Always a good idea to pull the files OFF the server so you can use these for future reference.

So far, my changes have not been major, but I can see David's point of view of not reinventing the wheel for themes that have had a major overhaul.

Kelley Rao, Webeze
www.web-eze.com
 
Adeptris

Posted: 7/15/2010
Quote message 

I will have an addon page to add menu support to existing 2.4 themes this friday evening, the code is done, and the testing is almost done, then just the how-to post to write friday evening (GMT).

It will do the following, disable the artisteer vertical widget and replace it with a new one, the menu will act and look the same as the artisteer vertical menu, simple or dynamic, inherits all the styles without any style changes.

Adaption of Buds code for the main horizontal menu using menu location, I will post on how to use it, and a second plan text horizontal menu that you could add to your themes.

As some are having a hard time understanding child themes, I will also be creating a page that will add all the WordPress 3 functions to a legacy Artisteer theme with just a few minor changes over the next week.

David :-D (watch this page for an update or my website!)

www.digitalraindrops.net
 
AMM

Posted: 7/17/2010
Quote message 

Hi Sean,

Sounds like I may need to try Toemans patch, but here is an alternative.

If I understand correctly what you are trying to do, I did this on the following website: http://www.celebratingholidays.com/

Some pages appear in the horizontal menu and some in the vertical menu. Is that what you are trying to do?

If so, first identify the page numbers for the pages you want to include or exclude from each menu.

In Wordpress, go to Appearance > Editor and choose Theme Functions.php.

Scroll through the code until you find this code for the horizontal menu:

wp_list_pages('title_li=&sort_column=menu_order’);

Change it to include or exclude your page numbers. Mine looks like this:

wp_list_pages('title_li=&sort_column=menu_order&include=5,2,7’);

Next scroll until you find this code for the verticul menu:

wp_list_pages('title_li=&sort_column=menu_order’);

Change it to include or exclude your page numbers. Mine looks like this:

wp_list_pages('title_li=&sort_column=menu_order&exclude=5,2,7’);

Hope that helps.

 
Jennifer

Posted: 7/29/2010
Quote message 

Hiya! Okay, so I created the two menus and drug the vertical menu over. But my horizontal menu doesn't nest the submenu items--instead my menu items make several rows of menu across the top, which of course, is unattractive. What is the solution to this problem?
 
Jennifer

Posted: 7/29/2010
Quote message 

Ah ha. I see that you can drag the menu items into submenu positions within the Wordpress menu interface. That fixed it!