Add custom posts to submenu automatically
Add custom posts to submenu automatically
Add custom posts to submenu automatically
I do not believe a plugin would be needed for this. You could add a class to the menu item (enable the class field under Screen Options when you are editing the menu item). Also be sure that you have the body_class() function applied to your body tag. Then you can do: .your-menu-item-class { display: … Read more
I had gone through the given link in your question and using firebug i have added and remove some css rules. Please have look on the below css rules. #menu-main-nav .sub-menu { /*left:-9999px;*/ // remove from line 648 } #menu-main-nav .flyout-parent .sub-menu { background: none repeat scroll 0 0 rgba(255, 232, 198, 0.95); border-color: #AAAAAA; … Read more
Without seeing your code it’s hard to say what you should do to fix it. The code you’ve supplied is the html output not the PHP code right? Take a look at one of my previous answers. Make sure you use the Updated for Edited For WordPress 3.3 Compatibility section of the answer. If you’re … Read more
your menu is pages oriented. pages have parents and the query asks for the parent and the siblings. When accessing posts, posts have no hirarcy, wp_list_pages will not work and you cannot query posts by parent. The big question is what you’d like to display when accessing a single post… if you want to display … Read more
If you check the arguments for add_menu_page, you’ll see that the fifth argument is your callback function. And, right now, there’s nothing in the mj_admin function. What you need to do is output your form in that function. <?php function mj_admin(){ ?> <h2>My Settings Page</h2> <form action=”options.php” method=”post”> <?php settings_fields( ‘mj-admin-settings’ ); do_settings_sections(‘mj-admin-settings’); submit_button(); ?> … Read more
Your setup is all over the place. Lets refer to the visual overview here: http://codex.wordpress.org/Template_Hierarchy#Visual_Overview Your page is going to use the page.php template. Your custom post type weine will use single-weine.php Your custom taxonomy sorte ( probably not the best name as it might clash ) will use the template taxonomy-sorte.php So we can … Read more
As @chrisguitarguy said, you can likely fix this via your php.ini settings. Specifically, I’ve run into this issue with a client which was solved by setting max_input_vars to something like 2000. In some cases though, menus can reach untenably large sizes and you may want a different way to manage them simply from a usability … Read more
So it turns out to be a bit easier than I thought: <?php if ($post->post_parent) { $ancestors=get_post_ancestors($post->ID); $root=count($ancestors)-1; $parent = $ancestors[$root]; } else { $parent = $post->ID; } ?> <?php $args = array( ‘depth’ => 0, ‘date_format’ => get_option(‘date_format’), ‘child_of’ => $parent, ‘title_li’ => __(”), ‘sort_column’ => ‘menu_order, post_title’ ); ?> <ul> <?php wp_list_pages( $args … Read more
Yes, you can easily control just using css. Complete guide about wp nav menu on wordpress codex. And my fast solution for this: functions.php add_theme_support(‘menus’); // Menus Support register_nav_menus(array(‘main_menu’ =>’Main Menu’)); // Main Menu of Website header.php <nav id=”menu”> <?php wp_nav_menu(array(‘theme_location’=>’main_menu’)); ?> <div class=”clear”></div> </nav> style.css /* Clearfix */ .clear {clear:both} /* First Level */ … Read more