Calendar Category

Can add multiple calendar widgets – each of them set to different categories (or All Categories).

The tooltip on the per-day links shows only post titles from that category, and when you click on the calendar link to bring up the day archive of posts, only posts from that category are shown.

Download

Download from WordPress Plugin Repository: Calendar Category v1.0.1 (5092 downloads).

Installation

  1. Upload the calendar-category folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Visit Appearance -> Widgets to see and use the new “Calendar with categories” widget.

FAQ

Something isn’t working correctly. What should I do?
Make sure you’re on the latest version of WordPress, then let me know, with as much detail as possible, what the problem is.

Changelog

1.0.1

  • Bump to support 3.1.
  • Completes the missing inline documentation.

1.0

  • Initial release.

Comments

  1. hello there! this is a great plugin! congratulations! but is there a way to put the calendar into my site with php in my templates wherever i want? and not through a widget. this is very important for me. and, when i click on the prev/next month can it just switch the month and let me on the same page and not redirecting me to the monthly archive?

    please help!
    thank you!

    • esthezia,

      There are other plugins that you can use that can help put a widget at any point you want. I’ll look into providing a simple way (no timescale) for this.

      Your second request requires a fair bit more work, to make an Ajax request to retrieve the posts and update the calendar. I’ll see what I can do if I have time.

  2. Steve says:

    Hi Gary,

    I am using the plugin as an events calendar on a Website for a band. First off, nice work, the calendar has been very easy to install/style.

    I have a category called ‘Events’, and I have written the loop to display future posts using this method: http://www.keithmillington.co.uk/wordpress/?p=22

    This works to display posts in the ‘Events’ category, but the posts aren’t showing up in the calendar. Is there a way to edit the plugin to show future posts?

    Thanks in advance!

    • Absolutely. Find all five occurrences of the phrase:
      post_status = 'publish'
      and amend to:
      post_status = 'future'

      If you’re happy with SQL code, then you could tweak it to allow for published or future posts.

      If I have time, I’ll try and get an option built in for this.

  3. Steve says:

    Thanks Gary, that worked. I had to change the less than symbol to greater than on line 219 b/c the post date should be greater than current date. Now I am having problems with the URL in the calendar date. The days with events are highlighted, and a URL is provided, but it links to a blank page.

    You can see the example at http://www.eighteenstrings.com

  4. hello i have this problem
    my calendar is set to show only the “events “category “:
    if I click on a highlighted day it shows the post on that single category and so far is ok. but then if I go back to the previous or next month , it loads automatically the archive page with all the posts also of different categories.
    how can I avoid showing this page with all categories and load only when I click on the highlighted day? Or is it OK to show all the post of the month but only of the category that I have set, “events”.
    Thanks in advance for your answers

    Francesco

    • Hi Francesco,
      I can see what you mean, and I agree it would be better like you describe. I’ve half got it working, in that only posts from the chosen category appear on the month/day archive page, but it currently affects ALL loops, including those in sidebar widgets and footers. I’ll keep working on it.

  5. AnonymousCoward says:

    I noticed that if I click on a day in the calendar, it shows me posts from all categories, and not just the selected category.

    I fixed this on my local machine by making a simple change. Instead of using “?calcat=CategoryID” in the a href tag, I use “&cat=CategoryID”.

    I am willing to provide a patch if you are interested.

    Thank you for the great plug-in!

  6. Hi, thanks for this good plugin.

    It is possible to use it with custom post types categories?

    Thanks in advance…

  7. Hi Gary, I really enjoy your plugin, and its pretty incredible that this is still the only one wp plugin on the web, that can work with calendar and categories…
    I also have a problem (just like Steve), because i would like my calendar to display the future and the published posts… I see in the code that you put the same idea in your “todo” list… So, is there any chance that this is done, or do you know how to do it? I could help, im not very good at php, but maybe i could help somehow :)
    Thanks again for great plugin!

  8. I don’t know if anyone is still interested in this, but I was able to get this working using a combination of some PHP updating, and a plugin called “The future is now”. If anyone is interested, I’ll post my edited PHP code here somewhere. If you want to see it working, go to http://www.pinnerconstruction.com, and go to one of the pages that has widets, and you will see how I’m using it as a bid calendar.

    • bahja Idres says:

      Dear,

      It is been a longtime i am looking for a solution to the problem of next/prev month links. I am a beginner and i am using the plugin by mr Gary, wich works well for daily archive links.
      In other words, I have: dailyurlarchive/?calcat=10 when clickin on daily links on my calendar, but only monthlyurlarchive when clickin in links of months (without calcat parameter, lets say 10 in this case).

      I looked also in development of the project in github, and generally in the web but in vain. but as I see, the problem is resolved in bid calendar in http://www.pinnerconstruction.com, after clicking on month link, you have the parameter of the specific category (calcat=3).

      Please to help me, your help will be valuable,
      Good end of wknd

      • bahja Idres says:

        The answer is :

        Add ?calcat=’.$category.’ in previous and next months links in Gary plugin php.

        Great plugin thanks for ur sharing spirit Gary,

    • echobravo says:

      Hi IT Advantage…. Did you post your php for this? I am also trying to combine calendar category with the future is now plugins :) thanks

  9. Atec.gp says:

    Dear Gary,
    Thank you for this plugin which is exactly what I was looking for. Therefore in my project (clubbing events) I would like to have both Past and FUTURE posts to be published on Calendar Category.
    So of course I replaced “post_date =” on lines 207 and 229. Thus I have TODAY and FUTURE posts but of course no more PAST posts. As I am a designer and not a coder and I spent many hours to tests various solutions without success. Removing “AND post_date >= ” makes the plugin in default status. So I am wondering if there is solution to fix it ?
    Moreover, when I clicked on previous month from current month I have posts from another category !
    Thanks in advance.

  10. Hey Gary, thanks a lot for releasing the plugin.
    I need help as to future posts from a category.
    My question is similar to Steve, but I did not know how to solve.

  11. I updated to wordpress 3.6 and now I see a “spinning circle” below the calendars. Here is the errors:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/skip/public_html/wp-content/plugins/no-future-posts/no-future-posts.php on line 74 and defined in /home/skip/public_html/wp-includes/wp-db.php on line 992

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/skip/public_html/wp-content/plugins/no-future-posts/no-future-posts.php on line 81 and defined in /home/skip/public_html/wp-includes/wp-db.php on line 992

Speak Your Mind

*