Help with custom field

Asked

Viewed 58 times

0

I would like to put in an api my custom field example:

"name"     => "teste", 

"name"     => "<?php echo get_post_meta( $post->ID, 'nome', true ); ?>",  

below follows the complete code:

<?php

require('routeros_api.class.php');

$API = new routeros_api();
$API->debug = true;

if ($API->connect('192.168.36.1', 'admin', '987987')) {
   $API->comm("/ip/hotspot/user/add", array(
          "name"     => "teste",
          "password" => "123",   
   ));
   print_r($ARRAY);
   $API->disconnect();
}

?>
  • Wouldn’t you just put the variable there? No echo

  • In the case as it would be without echo

  • "name" => get_post_meta($post->ID, 'nome', true);

  • Nothing didn’t work out, bro

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.