php - Wordpress: open page at bottom of parent page -


I am struggling with this for a few days and can not think now.

I have created a template for a particular page for the event menu and within that page I have a sub menu. This sub menu has an Event menu for example purposes: Item 1, Item 2 And item 3

These menu items are their own pages.

The submenu should open pages in this template. Example of the page layout below:

Header main navigation banner image content (item 1 | item 2 | item 3) for event event menu menu content footer

Content switches by clicking menu item, but the content remains constant for the event.

I am currently working on adding $ _GET variable at the end of the link, but I've hard-coded the menu. I do not want this because then the client can not change their menu and edit their menu. (The quantity of changes so far has become ridiculous.)

I've put the event menu and menu content in another nested loop, theoretically it reacts within the loop, though with it The initial tests have failed.

I really want to keep the dynamic nature of the Wordpress menu system, but it can not work without hard coding.

This time I will be happy

Thank you.

If the menu content for your HTML is not very unwieldy, you can potentially each menu have a Wordpress Leave in the page, where the client can edit it. Just create a WordPress page for each menu, drop it into your menu content, save it, and make a note of the page ID number.

Then, in your template, you can get in the menu content page like this:

  & lt ;? Php // menu is content in a page ID # 14 $ menu_one = get_post (14); Echo apply_filters ('the_content', $ menu_one-> Post_sign); ? & Gt;  

For your reference, get the wordpress codex on get_post:

On your original page, you can do instead of using GET to capture each menu , Just go ahead and load all 3 menus on the page load. Using CSS, you can hide both those that you do not want before and show only a default. Then using some JavaScript events on the menu item link, you can show the click-on menu and hide the other two.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -