Freelancer's Playground! New knowledges every now and then

23Jun/105

[CR]Post2PingFM Update

Hi there, now that my plugin is back in business, I need few people to be beta tester for my newest release. If you would like to take the challenge, you can contact me at ariefbayu@gmail.com and send me mail with '[cr-post2pingfm]Beta Tester Help' subject in it. Another news would be, I've created a dedicated support forum using UserEcho's Open Source package. FYI, it's a great service for creating support forum for your product. Go ahead, try it.

On a side note, I've received many complain that sometimes post are not submitted to ping.fm. I think I've addressed the problem in my soon to be released versions. Please be patience, or maybe you can submit yourself as beta tester.

21Jun/101

CR-Post2PingFM 0.10 Released

Hi there, sorry for the last broken release. Turns out it was my mistake. I accidentally added 'debug' parameter to user.post:(. I realize this after downloading python API and test it with my new API_KEY. Yes, the old one is suspended and then deleted by ping.fm. But, I got the new one about 2 weeks after that.

18Jun/101

WordPress 3.0 “Thelonious” Released!

Wohoo, finally! Been playing with the RC for weeks. Now that It's official, I'll start migrating this blog with new themes. I want something simple, with one column, maybe. Less ads, more content.
Look below for official video tour and see this link for complete features and change in this release.

10Mar/101

HOW TO: Display All Your Monthly Archive In One Page

Hi, today I want to talk about archive page. You know, the one that popped when you click on archive link? On normal wordpress themes, archive page will bound to post per page settings you've set on admin. However, what if you want to display it all in one page? Maybe because you just write small amout of posts per month that will only take 2 pages and you don't one your visitor to click next just to see it all?

5Mar/100

4 Simple Plugins That Just Do The Job!

Over several years working with wordpress, I've worked with so many plugins. Below is 4 simple plugins I've used that just work!

4Feb/101

Add Custom Column To Media Page

How do you get full image URL in Media Library? I bet you will go through this step:

  1. Go to Media » Library
  2. On Media Library list, click file name.
  3. Form Edit Media appeared. Select File URL and use it.

For single image operation, this should be enough. But, if you did have a lot of pictures, this operation would be very annoying. For this, I have a simple solution. With a few lines of code that later summarized into a plugin. Then you will have a way to access the images directly from the Media Library.

2Feb/107

Adsense under Image: Reloaded

A few month ago, my friend Jauhari contacted me, asking specific question about a wordpress plugin called Adsense Under Image. At that time, I crawl the code and though that it would be cool if it can have multiple images and or set randomly where the adsense code appeared. I try to contact the developer to submit my idea. But, the website listed is dead and the plugin itself is now aged more than 2 years. Now became dead site:(.

24Jan/108

Loading Contact-Form-7 Plugin Outside Post/Page/The_Loop

Hi, just want to share little snippet. I was developing wordpress site for my client and I want to use Contact-Form-7 (CF7) to speed-up my development time. I need to add form (custom form) outside the loop / post / page content. From CF7's documentation, there's no single text explaining how to do it.

So, I guess I have to get my hand dirty by crawling the code. Here's how I do that.
From anywhere on wordpress theme files, put this code to display your CF7 form:

<?php echo do_shortcode ( '[contact-form 2 "Banquet Inquires"]' ); ?>

3Nov/095

Wrapping get_post_meta() with default value

As wordpress developer, we will almost always use get_post_meta(). There's a catch in using it though, as there will be situation where we want to get a meta value on a non initialized meta. Something thing we expected to be present but not created yet.

20Aug/091

Using in_category To Show Different Template For Different Category In WordPress

When developing sites under wordpress, we, sometime came across condition where we need to show different templates for a particular category/categories. For example, I have a client that need a particular template for his website that is based on wordpress. The site is about restaurant that he own. It has 3 type of posts, regular post for news & events, store items, and menu. For regular post, well, there should be no problem, but for menu, there are several custom fields in actions and the same for store items.

I can go using several if..else or switch(). But, that would produce a bulky single.php which, I try to avoid. There goes, until I found out the simple solution on codex, that is using in_category(). The page also teach me how to implement it smartly. The solution is rather simple. All you have to do is, create several php files which contain codes and add this code inside your single.php:

<?php get_header();

$recipeArrays = array(6,7,8,9,10);
$cateringArrays = array(12,13,14,15,16,17);
$menuArrays = array(18,19,20,21,22,23);
$storeArrays = array(25,26,27,28,29,30);

if(in_category($recipeArrays))
{
	include('single_inner_recipe.php');
}
else if(in_category($cateringArrays))
{
	include('single_inner_catering.php');
}
else if(in_category($menuArrays))
{
	include('single_inner_menu.php');
}
else if(in_category($storeArrays))
{
	include('single_inner_store.php');
}
get_footer(); ?>

That's it, now you have a more manageable codes.