Back to Top in Html(Jquery)


HTML wise all we need to do is add a “back to top” link at the bottom of the blog post

Below Jquery code add in your header file:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function() {
    $(".top").hide();
    var offset = 820;
    var duration = 700;
    jQuery(window).scroll(function() {
        if (jQuery(this).scrollTop() > offset) {
            jQuery('.top').fadeIn(duration);
        } else {
            jQuery('.top').fadeOut(duration);
        }
    });

    jQuery('.top').click(function(event) {
        event.preventDefault();
        jQuery('html, body').animate({scrollTop: 0}, duration);
        return false;
    })
});
</script>

Below code add in footer file means end of page:
<a href="#" title="Back to Top" >Back to top</a>

Contact form 7 really simple captcha permission


After really simple captcha, if entered captcha correctly when click on submit button it’s take very long time to submit your details, because some of permission reason it is not creat captcha image in temp folder . Add below change in really simple captcha file.

Open really simple captcha folder from plugin folder -wp-content/plugin/really-simple-captcha/really-simple-captcha.php

really-simple-captcha.php:

old:

/* Image type. 'png', 'gif' or 'jpeg' */
        $this->img_type = 'png';

        /* Mode of temporary image files */
        $this->file_mode = 0444;

        /* Mode of temporary answer text files */
        $this->answer_file_mode = 0440;

Change to:

/* Image type. 'png', 'gif' or 'jpeg' */
        $this->img_type = 'png';

        /* Mode of temporary image files */
        $this->file_mode = 0777;

        /* Mode of temporary answer text files */
        $this->answer_file_mode = 0770;

Ajax not working in contact form 7


If ajax validation not woking in your theme, add below code into header.php above close  head [</head>]

 

<script type='text/javascript' src='/wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js?ver=3.40.0-2013.08.13'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var _wpcf7 = {"loaderUrl":"\/wp-content\/plugins\/contact-form-7\/images\/ajax-loader.gif","sending":"Sending ..."};
/* ]]> */
</script>
<script type='text/javascript' src='/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=3.5.2'></script>