It’s only fair to share…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.

  It’s only fair to share…

Read More Embed facebook conversion pixel for woocommerce

It’s only fair to share…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…

Read More Laravel 5.1 Pretty Pagination URL

It’s only fair to share…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.

Read More Out of memory when running large queries in Laravel

It’s only fair to share…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; } //…

Read More WordPress : How to get category ancestor

It’s only fair to share…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…

Read More WordPress : Custom Action Hook in Action