Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #489944

    Hi,
    I tried to put the code for a newsletter into the footer. Somehow Avia skips the code and shows only
    [avia_codeblock_placeholder uid=”0″]

    at the bottom. On the testsite i create the content, than i copy the avia-code and put it into a textfield. So on this site at the bottom you can see the code for Kontakt, Öffnungszeiten and newsletter how it is on a normal site and beneath the same code in the footer but the script is not showing.
    Any ideas?
    thanks in advance.

    #490241

    Hi xxtita!

    If it’s in a text widget then you do not need to use the codeblock shortcode. What is the code for the newsletter you are using?

    Regards,
    Elliott

    #490268

    Its ok when i dont need the shortcode, but i guess its also ok do use it. And its easier to style the footer with avia-shortcodes. Here is the unbelievable code for newsletter sign-up.

    <script>
    function loadjQuery(e,t){var n=document.createElement("script");n.setAttribute("src",e);n.onload=t;n.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded")t()};document.getElementsByTagName("head")[0].appendChild(n)}function main(){
    var $cr=jQuery.noConflict();var old_src;$cr(document).ready(function(){$cr(".cr_form").submit(function(){$cr(this).find('.clever_form_error').removeClass('clever_form_error');$cr(this).find('.clever_form_note').remove();$cr(this).find(".musthave").find('input, textarea').each(function(){if(jQuery.trim($cr(this).val())==""||($cr(this).is(':checkbox'))||($cr(this).is(':radio'))){if($cr(this).is(':checkbox')||($cr(this).is(':radio'))){if(!$cr(this).parent().find(":checked").is(":checked")){$cr(this).parent().addClass('clever_form_error')}}else{$cr(this).addClass('clever_form_error')}}});if($cr(this).attr("action").search(document.domain)>0&&$cr(".cr_form").attr("action").search("wcs")>0){var cr_email=$cr(this).find('input[name=email]');var unsub=false;if($cr("input['name=cr_subunsubscribe'][value='false']").length){if($cr("input['name=cr_subunsubscribe'][value='false']").is(":checked")){unsub=true}}if(cr_email.val()&&!unsub){$cr.ajax({type:"GET",url:$cr(".cr_form").attr("action").replace("wcs","check_email")+$cr(this).find('input[name=email]').val(),success:function(data){if(data){cr_email.addClass('clever_form_error').before("<div class='clever_form_note cr_font'>"+data+"</div>");return false}},async:false})}var cr_captcha=$cr(this).find('input[name=captcha]');if(cr_captcha.val()){$cr.ajax({type:"GET",url:$cr(".cr_form").attr("action").replace("wcs","check_captcha")+$cr(this).find('input[name=captcha]').val(),success:function(data){if(data){cr_captcha.addClass('clever_form_error').after("<div style='display:block' class='clever_form_note cr_font'>"+data+"</div>");return false}},async:false})}}if($cr(this).find('.clever_form_error').length){return false}return true});$cr('input[class*="cr_number"]').change(function(){if(isNaN($cr(this).val())){$cr(this).val(1)}if($cr(this).attr("min")){if(($cr(this).val()*1)<($cr(this).attr("min")*1)){$cr(this).val($cr(this).attr("min"))}}if($cr(this).attr("max")){if(($cr(this).val()*1)>($cr(this).attr("max")*1)){$cr(this).val($cr(this).attr("max"))}}});old_src=$cr("div[rel='captcha'] img:not(.captcha2_reload)").attr("src");if($cr("div[rel='captcha'] img:not(.captcha2_reload)").length!=0){captcha_reload()}});function captcha_reload(){var timestamp=new Date().getTime();$cr("div[rel='captcha'] img:not(.captcha2_reload)").attr("src","");$cr("div[rel='captcha'] img:not(.captcha2_reload)").attr("src",old_src+"?t="+timestamp);return false}
    
    }
    if(typeof jQuery==="undefined"){loadjQuery("//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js",main)}else{main()}
    
    </script>

    and if you take a look at the website i posted you can see it works as content, but does not work in the footer area.

    #490884

    Hey!

    Just paste that inside the text widget. No need to use the codeblock shortcode.

    If you get javascript errors then try removing this line from your code.

    if(typeof jQuery==="undefined"){loadjQuery("//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js",main)}else{main()}
    

    Regards,
    Elliott

    #497634

    Hi, if you can tell me how to configure the footer to get 25%, 25%, 50% without shortcode – then i can take the text-widget.

    But if you look at the site (url in 1. post) at the bottom, you can see the newsletter-subscription in the content-block from the main site. The same code is used for the footer, but it shows instead of the subscription
    [avia_codeblock_placeholder uid=”2″]
    [avia_codeblock_placeholder uid=”3″]
    There is no java-script error visible.
    Can you help me to put the subscription for the newsletter into the footer?
    thanks.

    #497662

    Hi!

    Please add following code to Quick CSS instead

    #footer .flex_column.av_one_third:nth-child(1) {
        margin-left: 0;
    }
    #footer .flex_column.av_one_third:nth-child(3) {
        width: 48%;
        margin-left: 2%;
    }
    #footer .flex_column.av_one_third:nth-child(1), #footer .flex_column.av_one_third:nth-child(2) {
        width: 24%;
        margin-left: 2%;
    }

    Best regards,
    Yigit

    #536427

    works, thankx

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Script for Newsletter not showing in footer’ is closed to new replies.