• 0

Accordions Is it possible to make a link trigger an accordion to open?

Question

Posted · Report post

First of all, I LOVE the accordion section. I've used it on a number of sites, and it is so easy and a great way to have a lot of information without overwhelming the reader. Nice work!

 

I would love to be able to link to a page and have a specific accordion open. I tried using an anchor, but that did not work. Is this even possible? 

Share this post


Link to post
Share on other sites

33 answers to this question

  • 0

Posted · Report post

flourishdesignstudio Should work now. I've updated Accordions with the fix. To update you will need to download it again from My Account and then unzip the file and upload it into your wp-content/plugins folder -- overwriting the current accordions plugin (automatic updates aren't working yet).

 

The version number with the fix is 1.3.1

 

Let me know if that does the trick.

 

Ellen

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks! I'm glad that Accordions has helped making lots of information accessible, 

 

And for your question, the answer is yes.  Basically, each accordion has an anchor link built in and when you copy that link and use it as a menu item or link on another page, it will go to the page and go down to the accordion and open it. 

 

I just hover over the accordion title I want to open and copy the link. 

 

Screenshot_8_15_13_7_32_PM.png

 

Then paste that link in your menu or on another page.

 

Let me know if it works for you.

 

Ellen

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

OMG! That is brilliant! That made my day! This is going to be fantastic for a new site that I am working on! I'll send you a link when I have the navigation finished, because the ubermenu is going to have categories and the pages under the categories will trigger different accordion items! I am so excited! And I can't believe it was so easy! THANK YOU!! 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

Okay, so I duplicated the problem, it's a conflict of some sort between RevSlider and Accordions. If you take RevSlider off the page the accordions work. I'm going to investigate and see if it is a problem in Accordions or RevSlider and get it fixed.

 

Just wanted to let you know I see what's happening, just have to figure out why.

 

Ellen

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

ellenmva Thank so much! I really appreciate your timely responses and your great work! As you can see from the sample, your accordions are a key feature in our new site. :)

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

ellenmva Thank you so much, Ellen! That worked like a charm! I appreciate your help!

2 people like this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Ellen,

 

I would like to revisit this topic because now I am having problems making this work. I am using version 1.5.3 and cannot make this work. We have used the links on other sites/versions successfully but cannot make it work now. Any thought?

 

Thanks Ellen!

 

Anna

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Ellen - I just purchased and am now having the same issue. Ex. http://nightvision-sandbox.com/medincrease/approach/

 

Once on the page, cannot toggle with above approach between accordion menus, either from top, or left, navigation. Any quick fix for this?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi agent654l"] , did you happen to find a solution? I am still having this problem and cannot find a solution to make this work in the current version of Accordions. @[member="ellenmva, any thoughts on why this used to work but doesn't now?

 

Thanks for helping to get this back up and working!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

flourishdesignstudio There is an update for Accordions that should fix this issue. Check in your wp-admin for the update.

 

Ellen

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

ellenmva, I am still having a problem with this. A good example can be seen here: http://dairyone.com/general-resources/forms/#ac1417-732038486 which should, in theory, open the "Feed and Forage Laboratory" accordion.

 

You will notice that I have the link with the #ac to open the accordion but it is still not working properly.  In case it helps I am running Accordions V 1.5.6, Wordpress 3.8.1 and DMS 1.1.6.

 

Thank you in advance for all your help. Accordions was a great solution for this site and this linking issue is the last part to make it work perfectly!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi ellenmva,

 

Just wondering if you have found a solution to this. I keep searching the forums and coming up empty. Everything is up to date so I am not sure what else to do. I know this worked on other sites that we built (using the older versions of DMS, WP and Accordions) but for some reason this has stopped now when everythgin is up to date. 

 

Thanks!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

ellenmva Hi Ellen! As I am updating this site rasaspa.com, I am revisiting this topic. Does updating to DMS2 allow you to search within accordions? I downloaded the Pageline Pro plugin and checked the box to make sections searchable, but it did not resolve the problem. So, I was just curious.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi ellenmva !

 

I am hoping that you can help me achieve 2 things with the accordions: I'd like to be able to have a link trigger an accordion to the open position and I'd like the accordions to be searchable.

 

I can achieve both separately, but not at the same time.

 

It seems that when I use shortcode, accordions are searchable (but I can not link to an accordion to trigger it to open)

When I use accordions as a section, I can link and trigger an accordion to open (but the content is not searchable).

 

Is there any way to allow for both?

 

 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

flourishdesignstudio The opening link should work with shortcode. Let me check out what is happening and get an update so you can have the accordions searchable as well.

 

Think the shortcode is the best way to go with search too because the search result is the page the accordions are on. If using the section it might only return the accordion post and the only way I know to achieve that is using a plugin like Relevanssi and using the option to search custom post types that are private.

 

Let me see though what's going on with shortcode and why the linking and opening isn't working. 

 

Best,

 

Ellen

 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks so much for looking into this! My client will be so happy when they can search their site, because it is so accordion-based. :)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

flourishdesignstudio The update for accordions should show up in your wp-admin Dashboard --> Updates shortly. You should be all set to use the accordion shortcode now. One thing to mention is make sure to include accordions_id="unique-value" in the shortcode where your unique value is something like faqs, otherwise it will be a random value that changes and want to make sure that value is constant. If you are showing the same accordions set on the same page using the shortcode make sure that unique value is different in each shortcode.

 

Hope I explained that clearly. So your shortcode might look like 

[accordions accordion_set="my-set" accordions_id="faqs"]

Best.

 

Ellen

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks so much! I'm so excited to try this tomorrow morning! I'll let you know how it goes. :)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi @ellenmva ! Thanks so much for your work on the accordions update. It seems to be working, but I am having an issue when i put the shortcode into a page and update the page, I get the following error:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/23/11603223/html/wp-content/plugins/accordions/sections/accordions/section.php:116) in/home/content/23/11603223/html/wp-admin/post.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/content/23/11603223/html/wp-content/plugins/accordions/sections/accordions/section.php:116) in/home/content/23/11603223/html/wp-includes/pluggable.php on line 1121

 

But then, when I press the back button and view the updated page, the accordion is there, just like it should be. But anytime I try to update the page after that, I get the error above. Can you take a look? 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

flourishdesignstudio Hmm, I think I know why you are getting those warnings, because you have the shortcode more than once on the page, but can't reproduce on my install. Don't worry, you'll be able to have as many accordion sets, just I'm calling something that should only be done once and right now it is being called for each accordion set. I'm going to dig into it, fix and push an update. 

 

Will let you know when to look for the update.

 

Best,

 

Ellen

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

ellenmva Thanks! On most pages, I am only using the shortcode once. For example: http://rasaspa.com/massage-bodywork 

 

On that same site, I have installed revellanssi and am adjusting the settings (it's VERY slow). Do you know if the premium version of this plugin is any faster? And are the terms within the search results clickable (meaning would they open the accordion that houses the term)? Currently the results will include the page, but then when you go to the page, it does not expand where the word is used.

 

You can test out the search function in the left column of the footer if it's helpful.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

flourishdesignstudio You should see an update in your wp-admin for Accordions that should fix the warning you were getting.

 

As for the Search function, don't know if there is anyway to make the accordion open with the information on the page. Search basically finds the page/post the terms are used on, Relavanssi will highlight words but I don't think it scrolls to where the term is located on the page.

 

If the Accordions post type was public we could make it bring up the accordion separately, but that would be something custom and would need to talk privately about. So someone searches for reflexology all the accordions that have the word reflexology in them would show up in the search result, they click on the title on the accordion and then it brings up the accordion post.

 

That search is terribly slow, try deactivating Revalanssi, see if the page still comes up in the search result since you are using the accordions shortcode the page the accordion is on should still show in the search result.

 

Best,

 

Ellen

 

 

 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

ellenmva Hi Ellen!

 

I updated the plugin, but I am still getting the same error:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/23/11603223/html/wp-content/plugins/accordions/sections/accordions/section.php:115) in/home/content/23/11603223/html/wp-admin/post.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/content/23/11603223/html/wp-content/plugins/accordions/sections/accordions/section.php:115) in/home/content/23/11603223/html/wp-includes/pluggable.php on line 1121

 

Please let me know if I can help you troubleshoot in any way.

 

Jackie

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now