Freelancer's Playground! Learn Programming, The Freelancer's Way

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.

Filed under: Site Updates 1 Comment
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?

Filed under: snippet Continue reading
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!

Filed under: Reviews Continue reading
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.

Filed under: Tutorial Continue reading
2Feb/103

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/105

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"]' ); ?>

Filed under: Tips N Trick 5 Comments
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.

Filed under: Tips N Trick 1 Comment
8May/093

WordPress Plugins To Kill (almost) All SPAM

Well, Yes, almost all SPAM. Because I don't know how to stop SPAM that is entered manually. The maximum I can to is throw it to akismet by marking it as SPAM.

Filed under: Reviews Continue reading
9Apr/092

CR Post2Pingfm 0.4 Released

Short notice:

  1. CR Post2Pingfm is now hosted on wordpress.org plugin repository.
  2. CR Post2Pingfm version 0.4 is released with new features:
    • Submit ping on all categories
    • Submit ping only on selected categories
    • Allow submit ping on all categories, except the forbidden
  3. Any comment, bug report, feature request is accepted.