• In WP 3.8, I was getting an ajaxurl undefined error when clicking on a comment to vote it. I added ajaxurl as a var to the below code to casepress-upvote.php, and afterwards the voting worked.

    add_action('wp_head', array($this, 'cpuv_ajaxurl'));
    
    function cpuv_ajaxurl() {
    ?>
    	<script type="text/javascript">
    		var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
    	</script>
    <?php
    }

    https://www.ads-software.com/plugins/casepress-upvote/

  • The topic ‘ajaxurl error’ is closed to new replies.