1

I need ajaxify "next" and "prev" links in wordpress calendar for navigation of months, without updating the page.

There is some plugins for this - but I call calendar without using widgets - get_calendar();

1

Write your required javascript, then use this code to display it on the page, it ensures that the script is only included if the calendar is displayed

add_filter('get_calendar',  'add_calendar_scripts');
function add_calendar_scripts($content) {
    add_action( 'wp_footer', 'output_calendar_scripts', 11);
    return $content;
}

function output_calendar_scripts() {
    ?>
    <script type="text/javascript" src="<?php echo get_template_directory_uri();?>/path/to/script.js"></script>
    <?php
}
  • i cant write that script - i wrote some script but it didnt work. – Ronin Oct 22 '12 at 12:53
  • 1
    I'm sorry but it won't work without it – Mridul Aggarwal Oct 22 '12 at 12:56
  • 1
    @Ronin As in the faq stated, I want to note that we do not handle questions, that require professional hands-on involvement, which are overly complex and specific things (known as work for me for free). If you can't do it by yourself with the help provided, then you will need to hire a developer to code this for you. – kaiser Oct 22 '12 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.