Archived

This topic is now archived and is closed to further replies.

  • 0

Using Bootstrap Icons in Accordion Header?


Question

Posted · Report post

Hi All

 

Site: http://tectrixone.com/our-products/

 

I'm trying to use Bootstrap Icons in Accordion headers but I don't seem to be able to use the Bootstrap icon code (or for that matter any text style code) mixed in with the pl-accordion shortcode. I can of course change the whole style of the Accordion header in CSS but I want to differentiate the arrow color from the text color.

 

Anyone done this or have any pointers it would be much appreciated - Many thanks 

 

--

Fintan

 

 

Share this post


Link to post
Share on other sites

6 answers to this question

Posted · Report post

Hi Fintan,

 

You cant do it when using the shortcode. However, I have found a way around it, but it's a bit of a pain, what you will need to do is use the Shortcode like you have already to create your accordion and then view your page.

 

Then inspect your page, where the accordion is located and copy the entire HTML code.

Once the code has been copied, go to back to your page editor and replace the accordion shortcode with accordion HTML you have just copied.

Then go to the div called 

 

<div class="accordion-heading"><a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse1"><i class="icon-home"></i> Soup &amp; Sauces →</a></div>

and add the font awesome code for your icon, see the code above, where I have already added the icon-home.

 

Repeat the process for all your accordions and then save/publish the page. Refresh your page and the icons should be added, see my image below as an example.

 

http://d.pr/i/Rzmf

2 people like this

Share this post


Link to post
Share on other sites

Posted · Report post

Danny, instead of the accordian bar, would it be possible to place a button on the page and have that initiate the accordion down?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

Not quite sure what you mean, therefore, would it be possible to create a new topic as this issue has been resolved and we will reply to your new topic.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Danny

 

Very clever! Thanks for taking the time to work it out. Much appreciated.

 

--

Fintan

Share this post


Link to post
Share on other sites

Posted · Report post

No problem, happy to help!

Share this post


Link to post
Share on other sites