How to show result of sql query in a page?

Solved! I follow this tutorial: https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type/ https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks/ And complimented with this: https://gist.github.com/mattheu/7cf235b4f932de891bc21cb5f3ff3de6

Where is the HTML-handler part in the wpdb class?

wpdb->query() is just running the query. It doesn’t do anything special. And strip_invalid_text_from_query() based on the inline documentation is just stripping invalid characters in the query. And, for your information, something like line-breaks doesn’t break the database. The database can accept any string data. You just have to make sure it correctly escaped when the … Read more

SQL query to bulk change short code in all posts

As Birgire mentioned in the comments, you can hook into the gallery output rather than performing a search/replace on the database. From the WordPress Codex: Function Reference/shortcode atts gallery Provides the ability to filter the array returned from shortcode_atts(). You want something like this: add_filter( ‘shortcode_atts_gallery’, ‘gallery_shortcode_exclude_thumbnail’, 10, 3 ); function gallery_shortcode_exclude_thumbnail( $result, $defaults, $atts … Read more