What you put doesn’t make much sense, as it turns a 1 step action, into a 4 step action
Why not just put:
$oferta = get_page_by_title( 'Oferta' );
$my_query = new WP_Query( array(
'post_type' => 'page',
'post_parent' => $oferta->ID
) );
What you put doesn’t make much sense, as it turns a 1 step action, into a 4 step action
Why not just put:
$oferta = get_page_by_title( 'Oferta' );
$my_query = new WP_Query( array(
'post_type' => 'page',
'post_parent' => $oferta->ID
) );