• A customer wanted WordPress for their upcoming site, and after having tried it out a bit I have some questions/issues you might be able to answer or shed some light on:

    Menu
    On the website we need the first level of the menu to display on the top, and the second, third etc. to display on the left, separately from the top menu.

    After having fiddled around quite a lot, I found a long thread discussing the issue – where they to my surprise concluded that this was not a supported feature as of yet – and I would have to implement quite a chunk of code to make it happen.

    Now, as you see, I use WP 3.3, which has the new menu system. So if I implement the following code, I can output just the first level of that menu:

    wp_nav_menu(
    	    array(
    	    	'sort_column' => 'menu_order',
    	    	'menu_class' => 'nav',
    	    	'theme_location' => 'menu-top',
    	    	'container_id' => 'menu-top-container',
    	    	'menu_id' => 'menu-top',
                    'depth' => 1
    	   )
    	);

    wp_nav_menu doesn’t have a startLevel attribute – and that makes me quite surprised. Can anyone explain why?

    I ended up with this code- which as far as I understand only outputs the pages that are children of the current page (and does not use the new menu system):

    // output menu from level two and up (actually - just pages)
    	if($post->post_parent)
    		$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
    	else
    	  	$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    	if ($children)
    	{
    		?><ul><?php
    			echo $children;
    		?></ul><?php
    	}

    Oh, and another thing about menus. It confuses me a bit to have the menu hierarchy separated and hidden away (though it lets me make multiple menus – which is great).

    Images
    The site needs images – perhaps one list image and one top image. Some pages also need a gallery. I want all the images to be cropped and resized when inserted. Also I want to control the position and layout of the gallery and images entirely. I don’t want the user to be able to move them around.

    How can I add images to a post? Not inside the body – but as attachment sort of. I did a lot of searching and found out that the editor had a “hidden” feature called gallery. I’ve really tried to understand how it lets me add and remove images from the gallery (I know they are added automatically when you upload them), but I just can’t seem to understand the logic in the GUI. Can anyone direct me?

    Also, I found out about the featured image option and the add-theme-support(‘post-thumbnails’) feature with add_image_size that lets me crop – and I did find the timthumb.php Just In Time Image Manipulation file – but still.

    Is it just me?
    So the question: Is it just me, or does it seem I am trying to make WordPress do something it is not intended to do? I looks awesome as a blog plattform, but perhaps it is not intended to be a CMS system for a corporate site?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Menus

    I think what you’re trying to accomplish is done in WordPress by using multiple menus, rather than one big multi-level menu.

    You would have your primary navigation menu, and then create secondary menus that you would then assign to other locations in your theme. WordPress is certainly a viable platform for a corporate site. I’ve built several. Here’s one of them:

    https://www.atkinsgroup.com/

    If you look at the “Indutrial” page, for example (https://www.atkinsgroup.com/industrial-division), you’ll see three separate menus rendered in different locations on the page (main nav at the top, category nav below main and to the right, and section nav down on the left side of the body). All of that is done with Menus, rather than coding anything in (other than the function to render the specific menu).

    Images

    All you have to do to render a gallery is use the [gallery] shortcode anywhere in the post body. Alternatively, you can call it directly in your theme in a specified location with do_shortcode() function. Order of the images is controlled by the order assigned to them in the media popup on the edit form.

    Thread Starter nitech

    (@nitech)

    Hey Kionae,

    Thanks for giving of your time. I had a look at your atkinsgroup.com site, and (though I might misunderstand) it looks like the separated sub-menu on industrial is not quite what I am looking for.

    I would like the tree to continue on the separated submenu – not displaying an entirely different menu. I understand it can be done that way, but I am interested in making things dynamic. Say for instance I should add another root level menu – I wouldn’t want to have to create a new “level 2 menu for latest added root level” for each time.

    I realize the image gallery functionality – but I can’t make it behave properly. How do I add an image from the image archive into the gallery (aside of uploading a new imag)?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is it just me?’ is closed to new replies.