Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1301427

    Hi there,
    we are using enfold since a couple of years now. In one Portfiolio page we use a Code Block for our calculator. The page works fine but if we made some changes in the avia layout builder. If we put the code directly with standard editor as HTML its working fine. Could you please check the Code in Private why this break in the frontend?

    thanks and regards

    #1301773

    Hey topnetat,
    Thank you for your patience if I understand correctly you are adding a html snippet to a code block element that adds second tags for:
    !DOCTYPE html
    html
    head
    body
    and then closes these tags within your page, these tags should only be used once per page.
    You will need to rewrite your calculator script another way.

    Best regards,
    Mike

    #1302550
    This reply has been marked as private.
    #1302599

    Hi,
    you could try adding this to your functions.php:

    function custom_calculator(){
        ?>
    <link href="/wp-content/themes/enfold/value/css/app.css?tag=40" rel=preload as=style>
    <link href="/wp-content/themes/enfold/value/css/chunk.css?tag=40" rel=preload as=style>
    <link href="/wp-content/themes/enfold/value/js/app.js?tag=40" rel=preload as=script>
    <link href="/wp-content/themes/enfold/value/js/chunk.js?tag=40" rel=preload as=script>
    <link href="/wp-content/themes/enfold/value/css/chunk.css?tag=40" rel=stylesheet>
    <link href="/wp-content/themes/enfold/value/css/app.css?tag=40" rel=stylesheet>
    <script src="/wp-content/themes/enfold/value/language.js?tag=40"></script>
    <script src="/wp-content/themes/enfold/value/data.js?tag=40"></script>
    <script src="/wp-content/themes/enfold/value/js/chunk.js?tag=40"></script>
    <script src="/wp-content/themes/enfold/value/js/app.js?tag=40"></script>
        <?php
        }
    add_action('wp_head', 'custom_calculator');

    and add this to your cold block element:

    
    <style>
    .form-class {
    width: 100%;
    }
    
    @media (min-width: 1680px) {
    #av_section_1 .container {
    max-width: 100% !important;
    }
    }
    
    .reference-line-box { border: 1px solid black !important; margin-top: 5px; }
    .link-container a { color: #fff !important; }
    .PortfolioCalculator__form__select__label {
    padding: 7px !important;
    }
    
    #av_section_1 .container {
    margin: 0;
    width: 100%;
    padding: 0;
    }
    
    .radio-label {
    padding: 0 !important;
    }
    
    </style>
    <script type="text/javascript"> window.selectedPlan = "value60" </script>

    but I believe you are either missing the code that shows the calculator in a div on your page or the script to show the calculator needs to be rewriten, this doesn’t look correct to me window.selectedPlan = "value60"
    I recommend getting in touch with the person that wrote it for you and asking them to help rewrite it.

    Best regards,
    Mike

    #1302631

    Many thanks Mike – I will try. Greatest Support!

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