Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #998383

    Hi guys,

    I have searched the forum and found this thread that seems to answer my question: https://kriesi.at/support/topic/change-h2-element-on-caption-title-of-fullscreen-slider/

    The problem is, I am not a professional developer, so I am not comfortable with going into the php directory etc.

    I was wondering if you were able to quickly go into my website and do it for me?

    Just to confirm, I just need the caption title on the fullwidth easy slider to be set to an H1 tag, rather than H2 which it is set to as default. I am using a child theme.

    Thanks for your help

    #998732

    there are more than one method.
    As Ismael said – just edit the alb element ( line 545 – of av-helper-slideshow.php – don’t forget to replace opening and closing tag) upload that edited element to child-theme/shortcodes folder and do this to
    functions.php of your child-theme:

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    ______________

    you can as an alternative do this to your child-theme functions.php :

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
        
          replaceElementTag('.slideshow_caption h2.avia-caption-title', '<h1></h1>');
        
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');

    this code preserves all attributes of the original h2 tag and replaced it with h1
    (if you like to be more specific you must select more specific f.e. including here the page-id or having a custom class on heading)

    __________

    alternative Method – and for me it is the best – take my edited ALB Element for that – then you have on each slider the option to choose the heading tag :
    read here: https://webers-testseite.de/edited-enfold-alb-elements/

    read carefully – you have to upload all 4 files in this case because the av-helper-slideshow.php is ruling 3 sliders:
    https://webers-testseite.de/edited-enfold-alb-elements/#sliders

    One disadvantage : If there are major updates you will have to download those edited files again if – there are something changed completely. then there will be a little time shift. (few days)
    The link of the page above will get allways the newest versions of those files.

    • This reply was modified 6 years, 4 months ago by Guenni007.
    #998779

    Hi,

    Thank you! For million time :)

    Best regards,
    Basilis

    #1003559
    This reply has been marked as private.
    #1003622

    Hi,

    You can edit the functions.php with the wordpress editor. Go to Appearance > Editor and select the functions.php from the directory overview on the right side.

    Best regards,
    Dude

    #1003720
    This reply has been marked as private.
    #1004302

    Hi Guys,

    Is it possible to “add a new folder in your child theme directory called shortcodes” via appearance > editor as it says here: https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#add-elements-to-alb

    Cheers

    #1004314

    Hi,

    You can only add a new folder or a file via FTP or your hosting control panel.

    WordPress Editor does not support adding new folders :)

    Best regards,
    Vinay

    #1039189

    Perfect!! Thank you!

    #1039372

    Hi Sandy,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

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