lesterchan / wp-showhide

Allows you to embed content within your blog post via WordPress ShortCode API and toggling the visibility of the cotent via a link.
https://wordpress.org/plugins/wp-showhide/
24 stars 11 forks source link

Multiple Show/Hides per page #9

Open simonvomeyser opened 6 years ago

simonvomeyser commented 6 years ago

Hey @lesterchan thank you for your plugin, works well and is simple to use 👍

One issue though.. multiple shortcodes per page do not seem to work, even with a clean install of wordpress (see gif)

kapture 2018-07-04 at 13 48 57

Would you be interested in a pull request since I think I solved the issue.

best wishes and keep up the good work Simon vom Eyser

lesterchan commented 6 years ago

You are supposed to specify the type which is being used as the DOM ID when you want to have multiple showhide, it is indicated in the readme https://wordpress.org/plugins/wp-showhide/

simonvomeyser commented 6 years ago

oh snap I overlooked that, sorry.

I still find it a little cumbersome, given the use case of an FAQ page with 10 or more FAQ-Items.

I think it would be much more user friendly for a "normal user" if you could just use as many showhide-shortcodes without caring to define a type="faq-item-1, type="faq-item-2 and so on.

Should I send you a pull request and you can look at my solution, otherwise you can just close this issue.

Thank you :)

lesterchan commented 6 years ago

There are way around it, like but generating a hash and using it. Feel free to send it, I will take a look.

rvpatel commented 5 years ago

Please update your multiple shortcodes code in live site.

JarmoHu commented 5 years ago

Please look at this page https://www.jinganghuluwa.tk/2019/04/07/986/ I hope you can translate it to your language.