New page does not get a menu_order

Why this is happening The default menu_order is 0, so unless you manually change this any new Page/Post inserted in to your DB will correctly have this menu_order set. You can set the menu_order for any Page via Quick Edit as below (or indeed the Edit Page screen if you wish) – By default, Post … Read more

If orderby parameter using pre_get_posts is the same for multiple posts what fallback does the query use?

For identical values they’ll be in whatever order they’re returned by the database engine, which would typically be the order they were inserted in the database. Anyway, the question you’ve linked is old, you can order by multiple columns with WP_Query: $query->set( ‘orderby’, array( ‘menu_order’ => ‘ASC’, ‘date’ => ‘ASC’ ) ); pre_get_posts acts on … Read more

WordPress 3.5 Gallery Menu Order not set?

it seems to me, after going through the source codes (both PHP and JS), that gallery and it’s order is not saved to database at all. Gallery exists only in JS when you are creating that and even does not persist when you leave a post editing page. Gallery gets saved only by inserting gallery … Read more

Reorder custom submenu item

Got it, thanks to cjbj‘s help, I was able to get the final solution: add_filter( ‘custom_menu_order’, ‘submenu_order’ ); function submenu_order( $menu_order ) { # Get submenu key location based on slug global $submenu; $settings = $submenu[‘options-general.php’]; foreach ( $settings as $key => $details ) { if ( $details[2] == ‘blogging’ ) { $index = $key; … Read more

wp_list_categories: order by term order?

The wp_list_categories() function calls the get_categories() function, that’s a wrapper for the get_terms() function, that creates an instance of the WP_Term_Query class. It doesn’t look like it supports ordering by term order. If the plugin uses the term_order column in the wp_terms table, then you can try to add a support for it’s ordering, via … Read more

Adding a menu item in the admin bar

every menu have an number . lower the number priority. add_action( ‘admin_bar_menu’, ‘wp_admin_bar_sidebar_toggle’, 0 ); add_action( ‘admin_bar_menu’, ‘wp_admin_bar_wp_menu’, 10 ); add_action( ‘admin_bar_menu’, ‘wp_admin_bar_my_sites_menu’, 20 ); add_action( ‘admin_bar_menu’, ‘wp_admin_bar_site_menu’, 30 ); more clear idea you can check the link below http://natko.com/custom-menu-item-position-in-wordpress-admin-bar-toolbar/

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