Wordpress calendar by category
12 June , 2012
This is a really shaky way of doing it but it works great.
- Create a new page in your template directory called “the-calendar.php” place the following code in it:
http://pastebin.com/sUSzJMWM - Create a new script file (that has access to jquery). Put the following code in it (MAKE SURE YOU HAVE SET site_url to equal “get_template(‘blog_info’) . ‘/’”):
http://pastebin.com/Q16ibAZ0 - Now just include this wherever you want the calendar to be (keeping in mind that the above script must be accessible):
http://pastebin.com/fyhXrCiW
Don’t forget to style your date.php page in your wordpress theme directory!!! - Here is some default styling that looks awful but should get you started:
http://pastebin.com/NMauFJWq
The Calendar works by calling (via AJAX) an external PHP file that gathers and echos the HTML code that generates the table. On the success of the AJAX, it just fills the specific div with the returning html.
Please feel free to expand on the code and also ask questions if you can’t get it to work! I hope it saves you some time!
I will make this a plugin when I get the time!
Add / View Comments to this post - There are 2 Responses
FT FacePress II, Set a sender address
4 August , 2010
I’ve just gone through the process of adding posts from my wordpress site into Facebook and Twitter and after trying various amounts of shitty plugins I found these two beauties:
They are great and the Twitter plugin pretty much works straight off. It allows your posts, when published/updated, to automatically be added into Twitter. Unfortunately, FT FacePress II was not such a chalmer.
The problem was that One.com limit PHP mailer emails to 20 per day, and so I was cursing and blinding for about an hour before realising why the plugin did not work. So here’s the work around:
- Create an email address with your host and call it something like out@domain.com
- Download the Plugin: FT FacePress II
- Edit the plugin and replace the following code:
if (!function_exists("ft_publish_status")) {
function ft_publish_status($emailAddr, $status) {
$message = '-';
$headers = 'From: '. get_bloginfo('admin_email') . "\r\n" .
'Reply-To: '. get_bloginfo('admin_email') . "\r\n" .
'X-Mailer: PHP/' . phpversion();
wp_mail($emailAddr, $status, $message, $headers);
if (is_wp_error($result)) {
return $result->get_error_message();
} else if (isset($result["response"]["code"])) {
return $result["response"]["code"];
} else {
return false; }
}
}
with:
if (!function_exists("ft_publish_status")) {
function ft_publish_status($emailAddr, $status) {
$message = '-';
$headers = 'From: out@yourdomain.com' . "\r\n" .
'Reply-To: '. get_bloginfo('admin_email') . "\r\n" .
'X-Mailer: PHP/' . phpversion();
wp_mail($emailAddr, $status, $message, $headers);
if (is_wp_error($result)) {
return $result->get_error_message();
} else if (isset($result["response"]["code"])) {
return $result["response"]["code"];
} else {
return false; }
}
}
And there we have it. You can now send as many freaking status updates as your host allows.
Enjoy success
Add / View Comments to this post - There are 3 Responses
Latest Comments
- James: Check this page out: http:/...
- Reshy de Creshy: We sit down here, our favourit...
- Matías: Hi. I can't do I work. I want ...
- James: Party play was finally added a...
- Jordan: then why does it show a party ...
Latest Poetry
- Concrete waves:
Post added - 10 September , 2012 - The irreversible:
Post added - 10 September , 2012 - Here we are:
Post added - 6 September , 2012
Latest Music
- Never finished:
Post added - 28 November , 2010
- Always rains – 04:29
- Cliffside – 01:13
- Cosmic tribunal – 04:03
- Desperation makes friends – 06:29
- Dusty blues – 03:22
- Forward is a chance we take – 02:33
- Intersect – 02:04
- Sheriff – 06:25
- To sleep – 01:20
- Wake in your dream – 02:38
Latest Pictures
- Untitled3:
Post added - 22 June , 2012




