We have finished migration to the new data center successfully and are working out some minor issues within the site's code. If you experience any difficulties or have any questions please email us at [email protected].
Ask your WordPress questions! Pay money and get answers fast! (more info)

Martin Pham



My contact info

Email: [email protected]

Answers Given: 107 (see them all)
Contests Won: 41
Prize Money Earned: $550
Questions asked: 0
Questions refunded: 0 (see all?)
Is a top asker (has the power to vote on anything):
Subscribes to all the discourse posted to the site?: No
Country: Vietnam
City: Ninh Binh
Netvotes this month (upvotes minus downvotes): 0
Netvotes of all time (upvotes minus downvotes): 0
Joined the site: July 9, 2012

Martin Pham's upvoted answers:

Martin Pham's downvoted answers:

Answers given to these questions:

See more?

Questions voted:

The community is grateful to those experts who take the time to vote on questions.

See more?

Martin Pham has not asked any questions

This member has not made any recommendations. If you are one of the top experts, please offer one now!

Martin Pham's discourse:

Written in response to Get age from birthdate function:

I try to check the function of Fahd Murtaza, it will be limited by some the date format.

... will be:

function getAge($birthdate, $format = '' ) {
if(!$format) $format = get_option('date_format');
$birth = DateTime::createFromFormat($format, $birthdate);
return $birth->diff(new DateTime())->y;

for example:

$birthdate = '1983/07/22'; // wp date_format is : Y/m/d
echo getAge($birthdate);

// for custom

echo getAge($birthdate, 'Y/m/d');


Fahad Murtaza had responses to this.

Written in response to something Dbranes wrote.

Thanks Dbranes for this!


Dbranes had responses to this.

Hello everyone,
I have to go back and hope to help more people.

Dear Lawrence,

I see there is some error in javascript on this wpquestions, detail:

* This code has been set incorrectly

<script type="text/javascript">
var active_site_questions = "{"javascriptquestions":1,"filemakeremerg":0,"symfonyexperts":1,"mysqlemergency":0,"dotheyknowaboutyou":0,"tutorruby":0,"startupquestions":0,"dpquestion":0,"wpquestions":2,"minxaweb":0,"lkrubner":0,"myhomework":0}";

-- Correctly: do not use double quote "" the variable is an array.

<script type="text/javascript">
var active_site_questions = {"javascriptquestions":1,"filemakeremerg":0,"symfonyexperts":1,"mysqlemergency":0,"dotheyknowaboutyou":0,"tutorruby":0,"startupquestions":0,"dpquestion":0,"wpquestions":2,"minxaweb":0,"lkrubner":0,"myhomework":0};


function my_callback did not work correctly when receiving empty data.

please use:

function my_callback(object) {
// clear div makeup
jQuery('#who_is_logged_in').html(' ');

//return if object empty or not define
if (object === null || typeof object === 'undefined') return;

// do something

or use this solution to save a number of queries to the server (passed cross-domain with json callback):

1. For file who_is_logged_in_example.php (on a different domain):


if ( ! defined( 'DIR' ) ) define('DIR', (($getcwd = getcwd()) ? $getcwd : '.'));

$seconds_to_cache = 60;
/* Fetch cache file on disk
* Class JG_Cache at http://www.jongales.com/blog/2009/02/18/simple-file-based-php-cache-class/
$cache = new JG_Cache(DIR.'/cache');
$data_users_login = $cache->get('key', $seconds_to_cache);

if($data_users_login === FALSE) {
$_users = array(); // do something
$data_users_login = json_encode($_users);
$cache->set('key', $data_users_login );

$exp = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
header("content-type: application/json");
header("Expires: $exp");
header("Pragma: cache");
header("Cache-Control: max-age=$seconds_to_cache");

echo $_GET['callback']. '('. $data_users_login . ')';


2. Use js functions on wpquestions.com or another domain:

function get_users_online() {
url: "http://domain.com/who_is_logged_in_example.php",
cache: false,
data: {}, // some query string
dataType: "jsonp",
jsonp : "callback",
jsonpCallback: "jsonpcallback_func"
function jsonpcallback_func(data) {
// do something with the received data


Best Regards,


Written in response to Please could i ask for assistance as to how an expert would visualize implementi...:

sorry John Cotton, I was wrong downvote for additional discourse http://wpquestions.com/flag/show/id/9805 after I read it.


Lawrence Krubner had responses to this.

Written in response to Add_Action Wordpress Gallery to use Name Instead of Post ID:

Hi spencert,
i'm wrong with $title vs $Title in function get_post_id_by_title


$post_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM {$wpdb->posts} AND post_type='post' ", $Title) );


$post_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM {$wpdb->posts} AND post_type='post' ", $title) );


Written in response to Help with Flexi Quote Rotator Plugin:

please remove any line - space...empty before start line and end line. Make sure





Sam Nasr had responses to this.

Written in response to Category Images displayed in a dynamic grid:

upload image using wordpress Media Library (wp-admin/upload.php) and select default when you post a page (grid) for display all parent category...edit link and make request to get child CAT of parent. Totally can do if you know patience.


Written in response to WP_Query do not include posts with certain value in custom field:

I think, I give solution for this problem works very well. But the question was given refund ...
And here http://wpquestions.com/question/showLoggedIn/id/6818 asked the same person and it also refund


Written in response to something Lawrence Krubner wrote.

Thanks Lawrence for this.
I will stop current job for Karent until this is resolved. I wait your response.


Lawrence Krubner had responses to this.

Written in response to Opencart SSL issues :





Written in response to make div width for header:

I can only give you some small tips to be able to edit any of the themes. This is free. If you are interested can contact me via email: [email protected]


See more?

Martin Pham has not had any questions refunded

Martin Pham suggested these prizes as appropriate for these questions:

See more?