Category / Custom Post Type permalink issue

A few issues- there is no %book_type% rewrite tag, your rewrite tags are %book% and %chapter%. Change all instances of %book_type% to %book%. Your taxonomy slug should just be ‘rewrite’ => array( ‘slug’ => ‘books’), the rewrite tag shouldn’t be in there. Last (minor) issue- In your post_type_link filter, you should wrap the fetching of … Read more

Unable to apply selective loading

Try this. It dequeues the style and script set in ‘init’. add_action( ‘template_redirect’, ‘remove_wizzylike’ ); function remove_wizzylike() { if ( ! is_single() ) add_action( ‘wp_head’, ‘remove_wizy’, 5 ); } function remove_wizy() { remove_action( ‘wp_head’, ‘wizylike_head’ ); // Enqueued in wizylike_init() wp_dequeue_style( ‘wizylike’ ); wp_dequeue_script( ‘wizylike’ ); }

Hide if subpages are shown

Doesn’t seem like you are using an if-statement for showing the sub-pages? If you are not, I guess you can do it with jQuery. var sub = $(“div.subpages”); if (sub.length > 0) { $(“#secondary”).hide(); // replace “secondary” with the ID of the sidebar }