Dropdown won't work in drupal - php

I'm redoing a website for a society at my Uni. Heres my progress: www.linclund.com/Newlund.com.
I'm very new to Drupal and Ckeditor and have done the majority of the work in CSS and html thus far.
My plan now is to get a decent dropdown menu, i installed the nice menu module and got it to be activated with all the scripts and styles, but it still won't respond as a dropdown.
This is what i'm looking at on the main page.php.
<?php if (isset($primary_links)) : ?>
<div class="pr-menu"><?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?></div>
<?php endif; ?>
Everything else seems to be normal, what do you have to do to get the dropdown functions of the menu activated? Could it be some script or style thats conflicting?

Edit the main menu links and set all links with children as expanded by default. Check the checkbox "Show as expanded" to enable this option.
But, the code you provide prints a specific menu (primary links) with a specific structure. You should better install the menu_block module and place the menu block under a region of your theme.

You need to set the nice menu block in a region. On nicemenu block's configuration page, you need to select the 'Menu' you want to use with nicemenu. Otherwise try supuerfish menu! I will offer what you want!

Related

Left Sidebar on Wordpress won't create menu

I tried googling this, but not having much luck...
I have been able to create a menu using wordpress and entering this code in my header:
<?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>
And this in my scripts part:
function register_custom_menu() {
register_nav_menu('header-menu',__( 'Header Menu' ));
}
add_action( 'init', 'register_custom_menu' );
But it seems that when trying to sort it, using the left side bar in the customize theme mode, it will not sort the menu nor will it remove any part of the menu that I add or remove using it.
From what I can tell it's just pulling my pages that I created within wordpress.
Keep in mind, this is a new theme I'm creating - my first theme. I have no PHP experience. Trying to learn as I go.
Picture of issue
I removed some of the names of the links for public view. I need to figure out how to also style this properly, but I've seen some other posts about it, so I'll review those later.
If someone can help me get this side menu to work with my current menu that would be great!
If you try altering your wp_nav_menu call to the following (no parameters):
<?php wp_nav_menu(); ?>
It should fall back on the first non-empty menu. While you may want additional menus later/will likely want to customize your menu(s) more, this should help with troubleshooting as whatever initial menu you have created (is non-empty) is the menu being edited by the customize page.
From what I can tell it's just pulling my pages that I created within
wordpress.
This likely relates to the setting "Automatically add new top-level pages to this menu" in the menu settings tab. This may be found under Appearance >> Menus, or under Customize >> Menus >> Clicking on the arrow to the right of your primary menu >> menu options (at the bottom of the resulting tab on the left).
Have you tried building the menu through Appearance-->Menu?
In the Wordpress backend, go to "Design > Menus", create a new menu there, add all entries you want to have, give it a name and in the "positions" tab on that page, assign it to the defined position in your theme (header-menu in your case). And disable the option to add all new pages/posts automatically.

Custom theme conflicts with menu

I am trying to add a drop down menu on my Wordpress website. I have a custom theme made by somebody I can no longer get in contact with. When I make a Page a sub-unit in the Menu section of the Wordpress admin area, it doesn't make that page a drop down. Instead, it just makes that page appear under what is supposed to be the parent. Any help is much appreciated. Here is the code for my menu:
<div class="navigation">
<?php
wp_nav_menu(array( 'menu'=>'main-menu','items_wrap'=>'<ul class="menu">%3$s</ul>'));
?>
</div>
The way your menu will behave will depend on how the theme and wordpress installed is configured. You will have to analyze the template and understand what it is doing and how it is rendering your menu.
Most of the times, the menu is hardcoded in the "index.php" page that is in the folder: "wp-content\themes\themename\"
Check there how the menu is build.

Order Pages in Wordpress

I am new to CMS development, I prefer the MVC concept for every job. But just know the client requested to develop a website built in WordPress. Everything is OK but I can't find to order pages in WordPress.
The case is: first I create a home page and then I create other pages, but the problem is every time I add new pages, it will be placed in my first menu.
So I want to move the home pages in first menu.
Please help, thanks.
You can create a custom menu (with the pages/links you want, and the order you want !). Then you can add that menu to be the new navigation menu (both header, and footer if you want)
References:
WordPress Menu (here you can find the step by step 'guide')
Just go to Appearance --> Menus and then you'll be able to create menus and edit at will. And if you need to create specific menus, see WP nav menu page. There you'll see several code samples, but you'll need something as simple as
<?php wp_nav_menu( array('menu' => 'Main Nav' )); ?>

Joomla menu system & dropdown menu in template

I am trying to make a simple drop down menu system for my Joomla site. But Joomla menu is completely confusing me. How does a joomla menu work?
For eg: In the image below the whole blue bar is a menu? or each item like 'Projects' is a menu?
Now I can make two pages for Project 1 & Project 2 but where will the 'Projects' link point to? If it does point somewhere then incase of no JavaScript I'd like to point it to a page that shows a list of the menu items.
How do I place my menu at this place in my template?
Why is there a default MainMenu and why do I need to use a menu to show the main content on my site. Shouldn't menus be used for making menus. And I only needed a menu item to show my content not that whole Main Menu. The main confusion is the Main Menu.
I don't wanna use a module coz I couldn't find a good one for 1.7 that uses jQuery (All JavaScript on my site is done with jQuery) and I read somewhere it can be made within the template.
All I want is to somehow place menu items lists inside the respective anchors up top so I can just show/hide them as dropdowns with jQuery.
I hope I haven't made the question confusing pointing to what I need to make. It's just that I'm super confused myself.
Please help.
I appreciate the help.
Thanks Alot.
Joomla menus are generated thru modules. In most cases mod_mainmenu. Theese modules you place in module positions. If your menue should be horizontal on top, then you put your mod_mainmenu module in the position "top". Be aware that every template uses different position names.

Javascript drop down menu for wordpress

I'm trying to create a javascript menu for my menu I posted a question the other day about a css drop-down but its just to tricky to do that.
Instead I'm thinking script, can someone give me a suitable javascript code that might work in IE? Here is a link to my test website.
I've tried various other jQuery, but they all rely on the parent ul being a class but as its dynamic content I'm not able to change this / don't want to because I would have to change it for each website and every other website I make. If you have a look at the source code on this website you can see what I mean. The website is quite well comented and you can view the menu online 128 roughly and I can't stress enough how this must be compatible in IE.
You can dynamically set the class with jQuery and then initialise the superfish menu. It works in IE6.
There are many plugins available 1-
Dropdown Menu Widget2-Wordpress CSS Dropdown Menu 3-Ryans Wordpress Dropdown Menu 4-Wordpress Superfish

Categories