Jump to content


Photo
- - - - -

Multiple Accordions On One Page

shortcode multiple accordion

  • Please log in to reply
7 replies to this topic

#1 Karoleena Homes

Karoleena Homes

    Advanced Member

  • Members
  • 32 posts
  • Framework Version:2.3.3
  • Country: Country Flag

Posted 27 November 2012 - 04:17 PM

Hi,

I am trying to implement multiple accordions on one page and can not get them to work.

I have made sure each accordion has a unique name
name="accordion1"
name="accordion2"

etc etc

I have, within each accordion, numbered them
number="1"
number="2"

etc etc

Yet it seems to only load the first set of accordions and then repeats it instead of the others (2,3,4)

What am I missing?

Please Login or Register to see this Hidden Content



Thanks

#2 ellenmva

ellenmva

    Advocate

  • Members

  • 256 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 27 November 2012 - 10:22 PM

Hope you didn't see my original post...it was wrong.

In your code the first two accordions you increase the number but then in the next accordions you went back to number 1. You need to keep increasing the number so that each number is unique no matter what accordion it is in.

#3 ellenmva

ellenmva

    Advocate

  • Members

  • 256 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 28 November 2012 - 12:02 AM

Also, you need to take out the [pl_raw] codes for the accordions not to repeat.

Here is the code that worked for me.

Please Login or Register to see this Hidden Content



#4 James B

James B

    Advocate

  • Moderators
  • 4983 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 28 November 2012 - 04:13 AM

Thanks Ellen :) Karoleen let us know if that's worked for you
  • ellenmva likes this

#5 Karoleena Homes

Karoleena Homes

    Advanced Member

  • Members
  • 32 posts
  • Framework Version:2.3.3
  • Country: Country Flag

Posted 04 December 2012 - 10:06 PM

Hi,

 

Thanks!

It works .... but there is massive spaces between the rows.  Minor in Chrome - Major in IE9

Please Login or Register to see this Hidden Content



#6 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 04 December 2012 - 10:29 PM

Wordpress is formatting your spaces into paragraph tags. Use the pl_raw shortcode, but wrap your entire pages content with it.

 

[pl_raw]

all your stuff

[/pl_raw]



#7 Karoleena Homes

Karoleena Homes

    Advanced Member

  • Members
  • 32 posts
  • Framework Version:2.3.3
  • Country: Country Flag

Posted 04 December 2012 - 10:38 PM

THANK YOU beardedavenger !!!

 

That worked :-)



#8 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 04 December 2012 - 10:41 PM

np







Also tagged with one or more of these keywords: shortcode, multiple, accordion