Support » Plugin: Rest Routes – Custom Endpoints for WP REST API » Add support for custom metas

  • I think this plugin has hugh potential!

    can yuou add in support for being able to select all custom metas within a post to output?

    I am pretty sure this code can be worked into the process somehow:

    
    $myvals = get_post_meta($post_id);
    
    foreach($myvals as $key=>$val)
    {
        echo $key . ' : ' . $val[0] . '<br/>';
    }
    

    OR

    
    <?php $getPostCustom=get_post_custom(); // Get all the data ?>
    
    <?php
        foreach($getPostCustom as $name=>$value) {
    
            echo "<strong>".$name."</strong>"."  =>  ";
    
            foreach($value as $nameArr=>$valueArr) {
                    echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                    echo $nameArr."  =>  ";
                    echo var_dump($valueArr);
            }
    
            echo "<br /><br />";
    
        }
    ?>
    
Viewing 1 replies (of 1 total)
  • Plugin Author WP Making

    (@wp-making)

    Hi @samjco. Thank you for your feedback! I’m studying this project, news soon. I’m planning a premium version as well because I need to pay the bills 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Add support for custom metas’ is closed to new replies.