Can I have Post Types under other Post Types in Admin menu?

Yes, this capability is available with register_post_type, via the show_in_menu argument, but whether or not the particular plugin you are using supports this I don’t know. add_action( ‘init’, ‘wpa70679_custom_types’ ); function wpa70679_custom_types() { register_post_type( ‘parent_type’, array( ‘public’ => true, ‘labels’ => array( ‘name’ => ‘Parent post type’ ) ) ); register_post_type( ‘child_type’, array( ‘public’ => … Read more

Different template for subcategories

The template hierarchy has filters for all types of templates. Here we can use category_template, check if the current category has a parent, and load the subcategory.php file in that case: function wpd_subcategory_template( $template ) { $cat = get_queried_object(); if ( isset( $cat ) && $cat->category_parent ) { $template = locate_template( ‘subcategory.php’ ); } return … Read more

WordPress admin screen very slow / timing out when editing or adding a new page/custom post

This may not help any, but it can’t hurt to try it… Log into your server admin area, invoke the client interface for your database administration (e.g. phpMyAdmin), delete all the posts where their ‘type’ is marked as a revision, then compact the table. If you have thousands of pages, you might also have millions … Read more

Show current navigation path from menu

The best way would be to use wp_nav_menu with a custom walker. Prerequisites: Registered theme location Menu saved to that theme location Useage Wherever you want the breadcrumbs (for theme location ‘primary’): <?php wp_nav_menu( array( ‘container’ => ‘none’, ‘theme_location’ => ‘primary’, ‘walker’=> new SH_BreadCrumbWalker, ‘items_wrap’ => ‘<div id=”breadcrumb-%1$s” class=”%2$s”>%3$s</div>’ ) ); ?> The custom walker … Read more

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