Hello,
We apologize for the issues you are facing with the FAQ accordion code and the inconvenience with our support ticketing system. Thank you for bringing this to our attention.
To address the mobile issues with the FAQ toggle, it’s important to ensure that the CSS and JavaScript used for the accordion are responsive. Here are a few suggestions:
-
Media Queries: You can add media queries to your CSS to adjust styles specifically for mobile devices. For example:
@media (max-width: 768px) {
.wp-block-rank-math-toc-block h2 {
font-size: 16px;
padding: 8px;
}
}
-
Test on Different Devices: Make sure to test the changes on various mobile devices and screen sizes to see how they behave.
-
Check for Conflicts: Sometimes, other plugins or themes can conflict with custom scripts. Try disabling other plugins temporarily to see if that resolves the issue.
-
Use a Plugin: If coding is causing issues, consider using a plugin like Turn Rank Math FAQ Block To Accordion, which can convert your FAQ block into an accordion without needing custom code. You can find more information about it here.
If you continue to experience problems, please reply to this ticket, and a human agent from our support team will assist you further.
Thank you for your patience, and we appreciate your feedback regarding our support system. We are always looking to improve our services.
Sources:
How to Turn Rank Math FAQ Block into an Accordion » Rank Math
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Could you please share the code you were using for the FAQ accordion? You can use a tool like https://pastebin.com/ to share the code with us so that we can check the issue further for you.
Regarding the support forum, we appreciate your input and will share your feedback with our with our concerned team.
Looking forward to helping you.
Thank you.
I used the first code in your doc entitled: 1 Using Code Snippet
https://rankmath.com/kb/turn-faq-block-into-accordion/
I just tried again, and when I tried adding it to rank-math.php it won’t save and produces an error:
Your PHP code changes were not applied due to an error on line 23 of file wp-content/themes/astra-child/rank-math.php. Please fix and try saving again.
Unmatched ‘}’
___________________________________
I also looked at the Code Snippets version, but it looks the same as the first version, and I’m unsure how to add it to Code Snippets. Can it be done in the free version of Code Snippets? If so, I’d prefer this because it’s the most convenient way I’ve found to manage all my snippets of code.
P.S. I really don’t want to add another plugin.
Hello,
The error you shared is occurring because you have not copied the complete/correct code. There’s an extra curly bracket } that you copied or didn’t copy. Please go back to the page and make sure to copy the correct and complete code.
If you’re still experiencing issues with this, please share access to your website with us so we can help rectify the issue.
Thank you for choosing Rank Math
I copied everything as is. It receives errors. Have you (or your team) tested this code on a site lately??
Hello,
Yes, this code is tested and it’s working fine on our local installations and several client websites.
If you are seeing that error it’s because the PHP code is not properly copied over to the website so you need to be sure that you don’t have a missing opening curly bracket somewhere in the code.
You can also share access to the website in the sensitive data section and our team will correct the code snippet if you are having trouble doing it yourself.
Don’t hesitate to get in touch if you have any other questions.
I know what a curly bracket looks like. I’m not that technically out of touch. I tried it several times. Is there something exactly in the code that I should not copy or vice versa? Why don’t you just leave me the code here so and provide step-by-step directions so that there’ll be no discrepancy or confusion.
And if you ask me you guys should have a built-in switch to activate this anyway as an accordion feature is a common feature with FAQ nowadays. Nobody should have to paste all types of code or use third-party plugins for this. It’s a dated and old-school process.
Hello,
We can’t paste certain types of code here on the forum because of security restrictions, but the code posted on the knowledge base is functioning properly – I just tested it again.
If you’re still experiencing difficulties, you can consider using the plugin option. You can install the ‘Turn Rank Math FAQ Block To Accordion’ plugin. Alternatively, you can grant us access to your website so we can assist in implementing the code on your site.
Thank you for your patience and cooperation.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.