WordPress is underrated. If you only hang out in framework circles you would think it is old, clunky, or not serious enough for modern work. I keep finding the opposite. For many projects it is the most practical path to a high quality site that real people can edit, host and keep running without drama.
I like boring technology. Not because I am against progress, but because most projects are not auditions for a conference talk. Clients want results they can afford, host, edit and keep running when I am not around. That means choosing tools for outcomes, not for hype.
It’s 2023, and we still have no simple way to insert Gutenberg blocks into WordPress using wp_insert_post. You’re out of luck if you want to pull content from an API and insert it dynamically with ease. There are methods like parse_blocks and render_blocks but they still require a lot of messing around to work with.
The way Gutenberg blocks work is strange. They’re not stored as an array or structured data in the database. They are stored in the HTML as HTML comments.
There seems to be a lot of outdated code out there from WordPress 2.x days on how to redirect a user to any page of your choosing after logging in, the below code will redirect a user to the homepage directly after logging in without taking them to the usual admin panel (in-case you have a custom page you want users to see).
This post is more of a self-reference for future projects, but thought I would share.