-
AuthorPosts
-
December 19, 2018 at 6:14 pm #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?
December 21, 2018 at 9:51 pm #1048393Hey tijshensen,
Yes, that is possible.
Best regards,
NikkoAugust 3, 2020 at 5:40 am #1234703@Nikko can you please provide an example?
August 4, 2020 at 4:33 pm #1235116Hi 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,
NikkoAugust 4, 2020 at 5:40 pm #1235136I was able to build in some conditional logic along with a new field for schema additions.
August 4, 2020 at 7:09 pm #1235189Hi smartstartinc,
We’re glad to hear that :)
Let us know if you need further assistance.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.