Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

WordPress Content Accordion WordPress


Hello I am using this WordPress Accordion ( on a site that i'm making, its all looking and working fine apart from the first accordion always stays open.

Ideally all accordions should be closed unless clicked to be open. On page load all accordions should be closed.

Can anyone help me with this?

Url for my site is in attached image. On the page the first accordion is 'Get Ahead'


Answers (2)


Dbranes answers:

It seems to work if you remove the p-tag around the content

<p>&nbsp;<br />



<strong>Edit:</strong> Try this filter, just to see if it works for you also to skip the p-tags:

remove_filter ('the_content', 'wpautop');

<strong>Edit 2:</strong>

Here is another work-around:

[accordion title="I belond to group 1" group="special"]your content here[/accordion]
[accordion title="I'm special" group="special"]your content here[/accordion]
[accordion title="I belong to group 1 as well" group="special"]your content here[/accordion]
[accordion title="Your Title Here" group="special"]your content here[/accordion]

i.e. you add a div around the shortcodes.

Dbranes comments:

Good to see it's working on the site now, with the extra div wrapper ;-)


Arnav Joy answers:

how you have added content ?

Ross Gosling comments:

Using the shortcode [accordion title="Your Title Here" ]your content here[/accordion]