menu behavior is not as expected

First thing i would do is register 2 menus, <?php function register_my_menus() {register_nav_menus(array(‘primary’ => __( ‘Primary Menu’ ),’topnav’ => __( ‘Top Nav Menu’ ) ) ); } add_action( ‘init’, ‘register_my_menus’ ); ?> second in wordpress menu panel i would create two menus and assign each to a display location Third i would display the menus … Read more

How to remove default tag and category options form a custom post type admin menu

Remove these lines: /* this adds your post categories to your custom post type */ register_taxonomy_for_object_type( ‘category’, ‘custom_type’ ); /* this adds your post tags to your custom post type */ register_taxonomy_for_object_type( ‘post_tag’, ‘custom_type’ ); They’re adding tags and categories to your post type, so of course they’re appearing.

Administration Pages Styling

This will put one separator right after ‘Appearance’ and one right before ‘Plugins’. Just make sure to give your menu position 62 or 63. You can just add it to whatever file is adding the admin page to begin with. This should be called after everything else has been added. function jpb_menu_isolator(){ global $menu; $menu[61] … Read more

How to add custom post type under option page

You can add custom post type in Settings menu by passing ‘options-general.php’ value to ‘show_in_menu’ parameter as shown below Example : ‘show_in_menu’ => ‘options-general.php’ Full Code : function codex_custom_init() { $labels = array( ‘name’ => ‘Books’, ‘singular_name’ => ‘Book’, ‘add_new’ => ‘Add New’, ‘add_new_item’ => ‘Add New Book’, ‘edit_item’ => ‘Edit Book’, ‘new_item’ => ‘New … Read more

Admin page repeatable fields

Try this one http://jsfiddle.net/jaredwilli/tZPg4/4/ and use array so input should be something like this <input type=”text” name=”data[1][time][start]”> <input type=”text” name=”data[1][time][end]”> <input type=”text” name=”data[2][time][start]”> <input type=”text” name=”data[2][time][end]”> …. then save data as array update_post_meta($post_id, ‘field_name’, $_POST[‘data’]);

Remove query var on admin pages when ‘Save changes’ pressed

This might be useful: there is a filter called removable_query_args. You get an array of argument names to which you can append your own argument. Then WP will take care of removing all of the arguments in the list from the URL. function add_removable_arg($args) { array_push($args, ‘my-query-arg’); return $args; } add_filter(‘removable_query_args’, ‘add_removable_arg’); Something like: ‘…post.php?post=1&my-query-arg=10’ … Read more

how can i add custom menu in admin panel?

You need to use add_menu_page and add_submenu_page to display menu and sub menu. For more, refeir https://developer.wordpress.org/reference/functions/add_menu_page/ https://developer.wordpress.org/reference/functions/add_submenu_page/

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