next month single page site

Support for the WordPress Calendar plugin
GuiHarrison
Posts: 1
Joined: Fri Feb 21, 2014 2:08 pm

next month single page site

Unread post by GuiHarrison » Fri Feb 21, 2014 8:05 pm

Hi!

I'm building a single page template from scratch and I'm loving using your plugin Calendar (have already used it in another similar site). But I'm having a big problem. Since I'm putting the calendar way down the page (the calendar 'page' is being called by anchor), the next and previous month buttons are quite a problem, since they reload the page and remove the anchor from the url. Is there a way to include my page's anchor after the new url? I've found the next and previous button code on the calendar.php file and I've changed like this:

if ($cur_month == 12)
{
if ($minical) { $rlink = ''; } else { $rlink = __('Next','calendar'); }
return '<a href="' . permalink_prefix() . 'month=jan&yr=' . $next_year . '#calendar' . '">'.$rlink.' &raquo;</a>';
}
else
{
$next_month = $cur_month + 1;
$month = $mod_rewrite_months[$next_month];
if ($minical) { $rlink = ''; } else { $rlink = __('Next','calendar'); }
return '<a href="' . permalink_prefix() . 'month='.$month.'&yr=' . $cur_year . '#calendar' . '">'.$rlink.' &raquo;</a>';
}
}

but final address doesn't change, for some reason... Any help?

Post Reply