Next page link via the custom menu

It turns out i solved the problem by renaming my Staff template from archive-staff.php to page-staff.php (or anything else for that matter), thus specifically telling WordPress not to trust the template hierarchy logic and to consider that url as a “page” url, not a custom post type archive. If you happen to have a use … Read more

menu item active class for author.php

Two built-in features of WordPress make this easy to accomplish, without any code: body tag classes, and the ability to add a class to a menu item. Any author archive pages will have the classes ‘archive’ and ‘author’ in the tag (along with others, including author-name and author-id). You can add a class to a … Read more

Admin menu post type

Yes you can do that. Use function add_menu_page http://codex.wordpress.org/Function_Reference/add_menu_page to add parent “All post types”, then use add_submenu_page http://codex.wordpress.org/Function_Reference/add_submenu_page to add pages to parent page: add_action( ‘admin_menu’, ‘my_custom_menu_page’ ); function my_custom_menu_page() { $slug = ‘all-post’; add_menu_page( ‘All post types’, ‘All post types’, ‘edit_posts’, $slug, ‘__return_true’ ); foreach( array( ‘post’, ‘page’, ‘foo’, ‘bar’ ) as $post_type … Read more

Adding a filter with custom function to the menu / navigation

I’m not sure how you’re settings up your menus but this is probably the most reliable method. function auto_custom_type_class( $classes, $item ) { $type = get_post_type( $item->object_id ); if( $type == “marke” && has_term( “laden-1”, “laden”, $item->object_id ) ) { $classes []= “laden-1”; } return $classes; } add_filter(‘nav_menu_css_class’, ‘auto_custom_type_class’, 10, 2 ); The problem with … Read more

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