Author: ronggur

This code will track product purchase / checkout. Copy and paste below codes to your functions.php and don’t forget to change xxxxxxxxxx with your own facebook pixel code.


Read More Embed facebook conversion pixel for woocommerce

I’m currently working on Laravel 5.1 websites and need some modification to laravel pagination. So in this post we will create laravel 5.1 pretty pagination URL. This steps will produce pretty pagination url Add Paginator to your Controller.php

Include your paginator view template to your main.blade.php view

Next is to create pagination.blade.php view…

Read More Laravel 5.1 Pretty Pagination URL

Have you ever faced “Out of memory” issue when running some large queries in Laravel?

By default, laravel will keep log all queries in memory, and at some points it can cause your app to use excess memory. Try adding lines below in your controller to solve this issue.


It will…

Read More Out of memory when running large queries in Laravel

Here is code I usually use to find ancestor or parent of a category [php] function getCategoryAncestor($cat,$index=0){ $parentCatList = get_category_parents($cat,false,’,’); $parentCatListArray = @split(",",$parentCatList); $topParentName = $parentCatListArray[$index]; $charReplace = array(" " => "-", "(" => "", ")" => ""); $topParentSlug = strtolower(strtr($topParentName,$charReplace)); $catAncestor[‘ancestor’] = $topParentName; $catAncestor[‘ancestor_slug’] = $topParentSlug; return $catAncestor; } // How to use :…

Read More WordPress : How to get category ancestor

There are two types of hook in WordPress, filter and action. And in this occasion I will try to give examples about Actions hook. According to Actions: Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more…

Read More WordPress : Custom Action Hook in Action