Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1047300

    Is it possible to copy the Accordion Element into the Enfold child-theme and add schema.org markup (question/answer) to it, and display it in the Avia Layout Builder as a new element?

    #1048393

    Hey tijshensen,

    Yes, that is possible.

    Best regards,
    Nikko

    #1234703

    @Nikko can you please provide an example?

    #1235116

    Hi smartstartinc,

    I apologize I can’t give an example since I have limited knowledge with schema.org markup however I can give you steps in which you can achieve it.
    1. Replace ALB element using the instructions in our documentation: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
    2. Once you have done it, just modify wp-content > themes > enfold-child (or the folder of your child theme) > shortcodes > toggles > toggles.php (line 861-871):

    $output .= '<section class="av_toggle_section" ' . $markup_tab . ' >';
    $output .= '    <div role="tablist" class="single_toggle" ' . $this->create_tag_string( $toggle_atts['tags'], $toggle_atts ) . '  >';
    $output .= '        <p 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></p>';
    $output .= '        <div id="' . $toggle_atts['custom_id'] . '" class="toggle_wrap ' . $contentClass . '"  ' . $toggle_init_open_style . '>';
    $output .= '            <div class="toggle_content invers-color ' . $inherit . '" ' . $markup_text . ' ' . $colors . ' >';
    $output .=					ShortcodeHelper::avia_apply_autop( ShortcodeHelper::avia_remove_autop( $content ) );
    $output .= '            </div>';
    $output .= '        </div>';
    $output .= '    </div>';
    $output .= '</section>';

    and insert the schema.org markup there.
    I hope this helps.

    Best regards,
    Nikko

    #1235136

    I was able to build in some conditional logic along with a new field for schema additions.

    #1235189

    Hi smartstartinc,

    We’re glad to hear that :)
    Let us know if you need further assistance.

    Best regards,
    Nikko

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