• Hi i create a custom template and run a query to understand how to execute query in wordpress. I run this query
    <?php
    global $wpdb;
    echo $sql = $wpdb->prepare(“DELETE FROM wpdb->users WHERE ID = 5”, $id) ;
    $wpdb->query($sql); ?>

    But it’s not working. how can we run wordpress query.

  • The topic ‘Delete user using wordpress query’ is closed to new replies.