and custom post_types to custom menu

Try adding the action after the function like this: function mt_add_pages() { // Add theme options page to the addmin menu add_menu_page(__(‘Competition’,’comp’), __(‘Competition’,’comp’), ‘manage_options’, ‘mt-top-level-handle’, ‘test_func’, ”, 5 ); add_submenu_page(‘mt-top-level-handle’, __(‘Answers’,’comp-answers’), __(‘Answers’,’comp-answers’), ‘manage_options’, ‘sub-page’, ‘test_func2’); } add_action( ‘admin_menu’, ‘mt_add_pages’ );

How do i put a dropdown list of ALL my post in the sidebar menu?

<?php // query for all posts $your_query = new WP_Query( ‘posts_per_page=-1’ ); echo ‘<select>’. ‘<option value=”” selected=”selected”>Select a post</option>’; // loop through posts while ( $your_query->have_posts() ) : $your_query->the_post(); echo ‘<option value=”‘; the_permalink(); echo ‘”>’; the_title(); echo ‘</option>’; endwhile; echo ‘</select>’; // reset post data wp_reset_postdata(); ?> Obviously, that does nothing unless you bind some … Read more

Drop down menus css in custom menus

Dropdown menu is something that handles by CSS or javascript (in some case) So a your theme should take care of that not the wordpress engine. When you add a nested menu items on wordpress menu that means wordpress will output a specific html structure for that menu. <ul> <li></li> <li></li> <li> <ul class=”sub-menu”> <li></li> … Read more

ID of parent Menu

Ended up using the following <script> $(function(){ var i =0; $(‘ul.sub-menu’).addClass (function(idx) { return “item-” + idx; }); }); </script> It adds a class of item-0, item-1, etc to each sub-menu it finds.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)