justintadlock / whistles

Something new. Something different. Tabs, accordions, and all that jazz. Done right.
49 stars 15 forks source link

Whistle inside of whistle #8

Closed HughP closed 10 years ago

HughP commented 10 years ago

Justin, I want to say I have been trying out several tab/accordion plugins today and yours really gets at something that others seem to be missing. That the content contained in these sets of tabs, in some sense needs to be a custom content type. I think you have really architected this well.

As this project grows (or if it does), it might be considered that content from any CPT could be added not just from the whistles content type. I think this would allow for maximum flexibility. I happen to use PODs to create my CPTs and so being able to add content from any CPT, rather than making a new CPT seems like it might make the plugin lighter... I don't know. Just a thought here.

BTW: I tried to add an accordion inside of a tab by coping the whistle shortcode and pasting it in the whistle CPT. I got an error:

Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 88 bytes) in /home/servername/mydomain.com/wordpress/wp-includes/query.php on line 2945

I later determined that it was because it was referencing the same whistle group, when I changed the group from "self" (and made it reference a second group), things worked normally. However, a separate issue occurs if I use tabs inside of tabs... when I select the sub-tab, then the first level tab is activated, rather than the content of the sub-tab. This second issue seems to be a rather common issue in the various accordion and tabs plugins I have been testing. It seems that the JS targeting the subtitles is not specified strict enough. Perhaps a class or id equivalent to the tab-title is needed.

justintadlock commented 10 years ago

WordPress won't allow you to nest shortcodes of the same name. For reference: http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes