Get specific Blocks from Post

PHP-side you can pass the post_content to the parse_blocks() function which will provide you with an array of associative arrays representing each block. Similar functionality is offered JS-side in the form of the wp.blocks.parse() function from the @wordpress/blocks package. For illustrative purposes, here is a var_dump() of that output for the default “Sample Page”: array(9) … Read more

How to remove image size inline style in article and include caption

Really not sure why you would want to do something like that. As Jacob Peattie said those dimenstion are there to prevent layout shift when images are being loaded. But if you still want to remove width and height attributes you could do this. add_filter(‘post_thumbnail_html’, ‘bt_remove_post_thumbnail_html_width_height’, 10, 4); function bt_remove_post_thumbnail_html_width_height ($html, $post, $post_thumbnail_id, $size) { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)