25 Responses

  1. Bryan
    Bryan April 19, 2009 at 12:11 pm | | Reply

    Thanks for the info. I always find it hard to work with widgets but I am still a noob at it all anyways. I just have a problem figuring out where to put the extra lines of codes usually since I understand php enough to edit pages and such. I am sure this will help.

  2. iGuzz
    iGuzz April 26, 2009 at 7:24 am | | Reply

    Does it work with 2.3 versions ? my site is still use wordpress 2.3 Thanks

  3. David
    David April 29, 2009 at 5:31 pm | | Reply

    iGuzz, you should really upgrade your Wordpress installation please see

    http://codex.wordpress.org/Upgrading_WordPress

    You are missing out on a lot of functions and security using such an old installation.

  4. anontanan
    anontanan May 1, 2009 at 1:05 am | | Reply

    Thank you for your sharing! It’s good for me. Bye :)

  5. Cristi
    Cristi May 4, 2009 at 5:45 am | | Reply

    This is exactly what I need. I’m thinking about using the NAVT plugin and this for an article sometime in the future for complete control over a WP menu. Now if Widget Logic had an graphical interface instead of conditional tags!

  6. Kaspars
    Kaspars May 7, 2009 at 4:48 pm | | Reply

    Justin, could I suggest that you amend:

    'before_widget' => '<div id="page-nav">'

    to include the unique widget identifiers and classes provided by WordPress by default:

    'before_widget' => '<div id="page-nav %1$s" class="%2$s">'

    I explained the reasons why this is necessary in one of my earlier posts about best practices for WordPress themes and widgets.

  7. baudry
    baudry May 8, 2009 at 5:37 am | | Reply

    Hello
    how do you do if you have english / french website do you define this in array?

  8. Kaspars
    Kaspars May 8, 2009 at 6:26 am | | Reply

    Justin, you are right, one cannot have two ID per tag. It probably was my widgetized part of brain thinking — “no widget can exists with proper IDs” :)

    However, I found another drawback of this method — it overwrites all wp_page_menu calls, which means that one cannot have another menu in the footer, for example, that also uses wp_page_menu.

    That said, the best solution would be to use your Widgets Reloaded plugin and turn those menu calls inside the theme files into widgetized areas.

  9. danimata
    danimata May 12, 2009 at 4:34 pm | | Reply

    Thank you so much for this information.
    I had to fix a WP blogsite sidebar and this was exactly what I needed.

  10. Jim Pickell
    Jim Pickell May 13, 2009 at 9:00 am | | Reply

    Love the concept of this, but if the primary purpose of using WordPress and WP themes (for me) is to try to avoid coding. So, needless to say, I am not quite there. I used a theme called Lifestyle for my site. Been very pleased with what I have been able to accomplish in the last week. I am looking to add some widgetized pages that can publish specific posts and thumbnails (rather than manually entering photos/links); however, even after watching the video and reading this post (and spending a few hours yesterday editing the functions.php), I can’t quite figure out where to place the code (although I am very very close). Any guidance would be greatly appreciated. I get the sense it’s not that hard but I get an error when I post all the code. When I only post a few lines in the logical place it seems like it “half-works” (as might be expected).

  11. Roberta
    Roberta June 8, 2009 at 6:18 pm | | Reply

    As I learn more I will always remember that I started here. Thank you for all the info I can put it to use in my business plan.Our site please check us out

  12. Knowledge Base June 30, 2009 at 4:10 pm |
  13. Jeremy
    Jeremy October 16, 2009 at 5:41 am | | Reply

    Hi!

    I am trying to implement this method on a project right now, and I’d have question about it: if I wanna have different widgetized menus, how do I do?

    Do I simply have to call
    and
    in the code, and add different sidebars, with different names, and different functions as follows:

    'Page Menu a',
    	'id' => 'page-menu-a',
    	'before_widget' => '',
    	'after_widget' => '',
    	'before_title' => false,
    	'after_title' => false
    ) );
    
    add_filter( 'wp_page_menu', 'my_page_menu_a' );
    
    function my_page_menu_a( $menu ) {
    	dynamic_sidebar( 'page-menu-a' );
    }
    
    ?>

    Is that it?

  14. Blair
    Blair December 29, 2010 at 6:27 am | | Reply

    Hey, love the premise of this code. I’ve tried it out, the sidebar appears in the widgets menu in the site admin, only nothing seems to have changed on the front end when widgets are added.

    Any ideas on how to get it to work/what needs fixing? The code works with WP3.0 custom menus, right?

    1. ben
      ben January 25, 2011 at 7:55 am | | Reply

      Same problem here. (I admit I’m totally new to wordpress)

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.