Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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();

share|improve this question

1 Answer 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
}
share|improve this answer
    
i can`t write that script - i wrote some script but it didn`t 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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