Ok, this is your original meta conditions that describe that you want all posts where key with name from $hideFromHome
equals (meta_compare
is =
by default) true
(actually 1
since you concatenate boolean value with string).
'&meta_key=' . $hideFromHome .'&meta_value=" . true
What you got in second snippet defines key name as pr_hidehome
, value as string the_value_you_want
and explicit comparison as LIKE
(which is SQL term and acts like somewhat tricky version of string search):
"meta_query' => array(
array(
'key' => 'pr_hidehome',
'value' => 'the_value_you_want',
'compare' => 'LIKE'
)
)
To express you original conditions with newer syntax it would be something like this:
'meta_query' => array(
array(
'key' => $hideFromHome,
'value' => true,
)
)
Again, =
is implied by default, but you might also need type
to make comparison with boolean work, depending on what your custom field holds.
See Custom Field Parameters in Codex for full list of available stuff.