In Wordpress we can get the full Ajax url as follows:
In PHP we can get it in the following way.
In PHP we can get it in the following way.
<?php echo admin_url('admin-ajax.php'); ?>
If you want to use it in Javascript then you can use it in following way.
<script type="text/javascript">
var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
</script>
No comments:
Post a Comment