-
AuthorPosts
-
March 7, 2021 at 8:50 pm #1286231
Hello,
For seo matters, I need to change the tag of the toggle field in the accordion ALB element.
Right now it’s déclared as a <p> tags and I’d like to change it into <H2> or <H3> depending my needs.Would there be a quick CSS code for that?
Thanks for your tips.March 7, 2021 at 9:31 pm #1286235on the toggles.php there is no filter set : avf_customize_heading_settings like in some other alb elements.
There is for those alb elements a little snippets to change it in this way – but for toggles.php you can have a child-theme toggles.php and edit that line to have a heading tag instead.
on 4.8.1 it is line 974 and closing tag is on 975$output .= ' <h3 data-fake-id="#' . $toggle_atts['custom_id'] . '" class="toggler ' . $titleClass . $inherit . '" ' . $markup_title . ' ' . $colors . ' ' . $hover_styling_markup . ' role="tab" tabindex="0" aria-controls="' . $toggle_atts['custom_id'] . '">' . $toggle_atts['title'] . '<span class="toggle_icon" ' . $icon_color . '>'; $output .= ' <span class="vert_icon"></span><span class="hor_icon"></span></span></h3>';
And for SEO purpose this will be the best way.
to have child-theme edited alb elements see docu: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-albA jQuery could change them all at once too – but on SEO this might be not the best solution.
March 8, 2021 at 10:54 am #1286376Thanks for your reply Guenni,
Unfortuantely I’m not too computer-literate so I’m not sure I followed well your explanations.
As a result, it doesn’t work (yet) ;)Lemme tell you what I’ve done.
First I do have a child theme and I’ve upgraded to 4.8.1 version.
1 – I’ve copied the code given in your link in my functions.php page of my child theme
2 – then I created a folder named ‘shortcodes’ inside my child theme folder
3 – I made a copy of the file: /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/toggles/toggles.php to /wp-content/themes/Enfold%20Child/shortcodes/toggles.php
4 – I’ve changed the code of the 2 lines 974,975 by yours given above
5 – I’ve disconnected from my user account, cleaned the cache and… booh… doesn’t work.What did I miss out on?
You can check the test page: http://shibum-design.com/v2/
Here is the headings hierarchy, No H3 as expected.<H1>: Tapissier Décorateur Grenoble <H2>: Sonia Organistka artisan d’art <H2>: Décorez et personnalisez votre ameublement <H2>: Achat de tissus de décoration <H2>: Formations et conseils <H2>: Shibum Design la passion avant tout <H2>: Tapissier d’ameublement, le métier <H2>: Restauration réparations <H2>: Tapissier garnisseur, FAQ
- This reply was modified 3 years, 8 months ago by rvga. Reason: Forget to mention something
March 8, 2021 at 11:14 am #1286381March 8, 2021 at 1:32 pm #1286436Correct that works fine, sorry. I guess I haven’t cleaned enough my cache before.
So now I have 2 more problems:
1 – Every toggle in the whole site will be in H3. I can’t have toggles in H2 in page A and toggles in H3 in page B if I want. Right?
This is no big deal but it would be really confortable to have the choice.
Can you help me please to advise and tell the dev team to create an option in this toggle ALB element in future version, where we could setup an Hn tag going from H2 to H6.
On top of that, it’s looks pretty clear to me that Google stress out the use of FAQ sections into pages for SEO optimization purposes.
As the option ‘markup’ for schema.org, that second option (Hn) would be really valuable too.2 – More problematic: since I’ve done the changes before (from step I to 4) I can’t get in my pages anymore :((
I have this little icon that keeps turning on the right for ever.
What’s going on and how to fix that please?
March 9, 2021 at 4:47 pm #1286783up up up please.
I’m facing a problem.
As I said above, I’ve followed Guenni’s instructions to change toggle’s tag into H2 when I realised that I could no longer enter in Enfold’s advanced editing tool. I can’t work on pages anymore, I can’t design them, that is a problem.Do I have to go backward?
Need help please.- This reply was modified 3 years, 8 months ago by rvga.
March 11, 2021 at 12:19 am #1287274I still wait for help about this topic.
In the meantime I removed everything I’ve done in order to get H3 in the toggle accordion.
But I still wasn’t able to enter into the pages through the advanced builder.
So I decided to go back to enfold 4.7.6.4 version.
Now everything seems to work as usual.March 12, 2021 at 7:44 am #1287599Hi rvga,
I’m sorry for the late reply. So you have rolled back the theme to 4.7.6.4, and things are working as they should with editing after that? If you need further help from us, then please let us know what you are having problems with, and include admin WordPress and FTP login details in private, so that we can have a closer look at your site.
Thanks @guenni007 for helping out :-)
Best regards,
RikardMarch 12, 2021 at 10:38 am #1287627Guenni brings me a pretty nice solution to modify toggles into H2 or H3.
But… unfortunately as I said above, once I had followed and implemented his instructions I couldn’t enter into any of my pages anymore meaning I could access the advanced page builder anymore.
This is the reason why I came back to ealier version of Enfold.
And that issue hasen’t been resolved yet.So now, I’m under 4.7.6.4 version, I’ll probably go back to 4.8.1
And toggles in Acordion are still tagged in <p>That would be really more confortable if we coud have (in future versions) an option directly in the ALB Accordion element, like that suggestion:
March 16, 2021 at 3:44 am #1288412Hi rvga,
Thanks for the update. I’ve tried to reproduce the problem you are describing on a local installation, but I haven’t been able to do so. The override suggested by @guenni007 works fine, and editing pages works as it should after the fix has been implemented as well.
If you need help with implementing this override, then please share WordPress and FTP login details with us in private.
Best regards,
RikardMarch 16, 2021 at 6:46 am #1288427Ok good idea Rikard.
But I’m overwhelmed at the moment and I can’t try Guenni’s solution again.
As soon I have more spare time, I will give it a chance again and let you know through this thread.
Please don’t close it.
Talk to you Later.March 19, 2021 at 10:33 am #1289126 -
AuthorPosts
- You must be logged in to reply to this topic.