Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #272709
    annahernandez99
    Participant

    I did a custom wpdb query in plugin init.php :

    $wpdb->get_results(…query);
    but I can’t use the php code inside my registered Gutenberg block’s edit() function, because it is React JSX code… how do I pass my data results to my React Gutenberg BLock inside edit() or save() function?

    edit: maybe I am thinking too hard.. it’s basically just normal React Code, so I guess I can also use a custom sql library from npm registry, and just import it and use it inside react to do a normal SQL query, correct?

    #272784
    Skandha
    Keymaster

    @annahernandez99: Hello there,
    This support is only for issue related to Catch Themes. Please post your issue on WordPress Support forum.

    Kind Regards,
    Skandha

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘WordPress Gutenberg Blocks query a table inside React JSX?’ is closed to new replies.