Artisteer on Multisite, Network wide menu


Author Message
Michael

Posted: 4/30/2012 Quote message   

Anyone know how to implement this? I have been having huge troubles getting it to work.
I have tried implementing: http://wpmututorials.com/plugins/networkwide-menu/
But without success.

tips and tricks welcome,


Michael
 
Michael

Posted: 4/30/2012 Quote message   

Oh, forgot.

It is 1 theme on the complete network, and I want the navigation unified. Dame menu on main site, as on subsites.
 
Michael

Posted: 5/2/2012 Quote message   

Here is a way that would work, jus tnot entirely sure where to put that in artisteer. Tried to put it into header.php in the NAV section but it did not work.

http://ostedesign.com/wordpress-multisite-global-navigation-menu-synchronization

tips still welcome,


Michael
 
Michael

Posted: 8/10/2012 Quote message   

Still no solution to this?
 
speedyp

Posted: 8/10/2012 Quote message   

Hey Michael
Not sure I understand the problem, or what you're trying to achieve?

You want all your subsites to share the same menu?
And they all have the same theme?
 
Abland

Posted: 8/11/2012 Quote message   

Hi, Michael,

In your theme's "header.php" find:
<?php

echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'cu-hmenu'
)
);
?>

Add the codes in there:
<?php

global $blog_id;
$current_blog_id = $blog_id;

switch_to_blog(1);

echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'cu-hmenu'
)
);

switch_to_blog($current_blog_id);
?>

 
Abland

Posted: 8/11/2012 Quote message   

Hi, Michael,

Note in my post above I'd used 'cu-hmenu' instead of 'art-menu' - be sure to use your prefix so styles stay intact.
 
Michael

Posted: 8/11/2012 Quote message   

Quote Abland:

Hi, Michael,

Note in my post above I'd used 'cu-hmenu' instead of 'art-menu' - be sure to use your prefix so styles stay intact.


 
Michael

Posted: 8/11/2012 Quote message   

Sorry for the double post!

Thanks for the help, works like a charm!

I copied the original theme to a new folder, edited the style.css and added above instructions into the header.php

mmo85 -> mmo85nm
edit style.css
edit header.php

This way I can have the old style and also a network version for select sites.

Thanks!
 
Michael

Posted: 8/11/2012 Quote message   

If I wanted to change the Vertical Menu I'd do the same changes in

sidebar-default.php


<?php ob_start();?><?php
echo theme_get_menu(array(
'source' => theme_get_option('theme_vmenu_source'),
'depth' => theme_get_option('theme_vmenu_depth'),
'class' => 'myr-vmenu'
)
);
?>


to


global $blog_id;
$current_blog_id = $blog_id;
switch_to_blog(1);
echo theme_get_menu(array(
'source' => theme_get_option('theme_vmenu_source'),
'depth' => theme_get_option('theme_vmenu_depth'),
'class' => 'myr-vmenu'
)
);
switch_to_blog($current_blog_id);

 
Abland

Posted: 8/11/2012 Quote message   

Hi, Michael,

I'm glad you posted this question. I looked at it when it first came up (a few months ago :-/ ) - and wanted to look into it but got side-tracked ... bills, groceries, etc :-D

Thanks for finding and posting that code because I've got the answer now for my multi-sites, too.
 
Abland

Posted: 8/11/2012 Quote message   

Quote Michael:


 
Michael

Posted: 8/11/2012 Quote message   

Quote Abland:

I'm glad you posted this question. I looked at it when it first came up (a few months ago :-/ ) - and wanted to look into it but got side-tracked ... bills, groceries, etc :-D


Thanks for the help and yea, I am getting sidetracked too easy aswell. Sometimes I feel I have an attention span of a fly :D

 
Michael

Posted: 4/16/2013 Quote message   

If you are still around, I could use a solution like this for the latest Artisteer v4.1.0.59861

The header.php looks a lot different now.

Testpage: http://dev-mmo.mmo-game.eu/
 
Michael

Posted: 4/17/2013 Quote message   

It is now online on http://www.mmo-game.eu

could still use a hint on where to insert the "switch_to_blog(1);" on the latest Artisteer.
 
Abland

Posted: 4/19/2013 Quote message   

Hi, Michael,

In header.php find:
<?php

echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'myr-hmenu'
)
);
get_sidebar('nav');
?>

Edit to this:
<?php

global $blog_id;
$current_blog_id
switch_to_blog(1);

echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'myr-hmenu'
)
);

switch_to_blog($current_blog_id);

get_sidebar('nav');
?>

 
Michael

Posted: 4/21/2013 Quote message   

Thanks, I'd have found it if it was that easy.

Here is my whole header.php



Appreciate the reply though,

Michael
 
Abland

Posted: 4/21/2013 Quote message   

Hi, Michael,

Is the menu in the header itself (not the file)? Check sidebar-header.php to see if the menu code is in there.
 
Michael

Posted: 4/23/2013 Quote message   

Thanks that worked like a charm in sidebar-header.php

However I added the code from the top posts, since the other code seemed to cause issues with top widgets. There was also a missing ";" after $current_blog_id from the second line. Here is the full example.


global $blog_id;
$current_blog_id = $blog_id;
switch_to_blog(1);

echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'myr-hmenu'
)
);
switch_to_blog($current_blog_id);

get_sidebar('nav');


Thanks a ton Abland!
 


Artisteer is not affiliated with or endorsed by Joomla!™ or Drupal™ or WordPress™ Projects.

Other services from Artisteer Team: stock photos, WordPress themes and Joomla templates. Createer and more are coming soon.

Copyright © 2008-2014 by Artisteer, Ltd