Am i’m doing something wrong here?
yup. the documentation is a bit confusing, we’ll fix that. It really works more like:
[expand title="Root Level"]
[expandsub1 title="Nested Level 1"] [/expand]
[expandsub1 title=”Nested Level 2"] [/expand]
[expandsub1 title=”Nested Level 3"]
[expandsub2 title=”Nested Level 3.1"] [/expand]
[/expand]
[/expand]
Does that help?
Thanks for the quick reply!
I see now how the code should work, your code makes a lot more sense than mine 🙂 Unfortunately, when i use your code, this is the result: http://test.goingonline.nl/test/
Without the sub elements the shortcode works great though.
I’m using a clean WordPress 4.8.1 install.
ah, ok, this is an easy fix.
1. change the default tag from span to div in the plugins settings under:
Dashboard > Settings > Collapse-O-Matic
Next: be sure you do not have any extra html elements by switching to the ‘text’ mode in the editor rather than the default ‘visual’ mode. As a rule, if you paste shortcodes into the editor always use text mode. Visual mode will keep all the bloated html formating that tends to mess things up.
Give that a try and let us know if it resolves your issue, or if you need a bit more assistance.
Thank you aggain.
I don’t get it. I’m sure it’s me (sorry for that), but i can’t get it to work.
This is the code i’m using now:
[expand title="Root Level"]
[expandsub1 title="Nested Level 1"] <p>Test</p> [/expand]
[expandsub1 title=”Nested Level 2"] <p>Test</p> [/expand]
[/expand]
Result is this: http://test.goingonline.nl/test-2
The settings in Collapse-O-Matic are (only the Tag attribute i have changed, the rest is default):
Tag Attribute: div
Targtag Attribute: span
Collapse/Expand Duration: fast
And all other settings are empty or unchecked.
Now i tried this codes as well, all of these codes give different results (even a extra white space gives another result sometime):
[expand title="Root Level"]
[expandsub1 title="Nested Level 1"] <span>Test</span> [/expand]
[expandsub1 title=”Nested Level 2"] <span>Test</span> [/expand]
[/expand]
[expand title="Root Level"]
[expandsub1 title="Nested Level 1"] Test [/expand]
[expandsub1 title=”Nested Level 2"] Test [/expand]
[/expand]
[expand title="Root Level"]
[expandsub1 title="Nested Level 1"]
Test
[/expand]
[expandsub1 title=”Nested Level 2"]
Test
[/expand]
[/expand]
I’m sorry to bother you with this.
oops! there was a mistake: you need to close the expandsub tags with a expandsub tag:
[expand title="Root Level"]
[expandsub1 title="Nested Level 1"] [/expandsub1]
[expandsub1 title=”Nested Level 2"] [/expandsub1]
[expandsub1 title=”Nested Level 3"]
[expandsub2 title=”Nested Level 3.1"] [/expandsub2]
[/expandsub1]
[/expand]
Also, you will want both the Tag Attribute and the Targtag Attribute to be: div
That should do it. let us know and sorry for the confusion, was a looong day yesterday.
-
This reply was modified 8 years, 8 months ago by
twinpictures.
Your help is very much appreciated and it works great now! Thank you so much.
One thing, i had to replace the double quotes to single quotes for the titles. Otherwise the titles didn’t show up correctly.
[expandsub2 title='Nested Level 2']
Thank you so much for your help.
-
This reply was modified 8 years, 8 months ago by
goingonline.
The quote issue is most likely due to using the Visual tab in the editor. This will convert normal quotes to curly-quotes.
Regardless, you got it working, HUZZAH!
Issue marked as resolved.