Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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.

    #1286235

    on 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-alb

    A jQuery could change them all at once too – but on SEO this might be not the best solution.

    #1286376

    Thanks 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, 9 months ago by rvga. Reason: Forget to mention something
    #1286381

    Yes – and you have done it the right way – and i can see it:
    click to enlarge:

    #1286436

    Correct 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.
    screenshot

    What’s going on and how to fix that please?

    #1286783

    up 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, 9 months ago by rvga.
    #1287274

    I 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.

    #1287599

    Hi 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,
    Rikard

    #1287627

    Guenni 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:
    Ability to change tag's togglers in accordion

    #1288412

    Hi 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,
    Rikard

    #1288427

    Ok 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.

    #1289126

    Hi,

    Thanks for the update. We’ll leave this thread open for you, please get back to us when you have more time.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.