Hi there,
I have a problem with Advanced Ads as it still uses the classic editor. They have a way to insert code but I have a problem with the GB headline block.
Time ago I got the following to make Advanced Ads working with GB CSS but it seems not to work with the headline block:
add_filter( 'generateblocks_do_content', function( $content ) {
$post_ids = array( 42332, 42333 ); // A post ID to check the content of. Can be dynamically set.
foreach ( $post_ids as $post_id ) {
if ( has_blocks( $post_id ) ) {
$block_element = get_post( $post_id );
if ( ! $block_element || 'advanced_ads' !== $block_element->post_type ) {
return $content;
}
if ( 'publish' !== $block_element->post_status || ! empty( $block_element->post_password ) ) {
return $content;
}
$content .= $block_element->post_content;
}
}
return $content;
} );
Basically, as a workaround, I want to use the formatting of the widget title, but I don’t know, how to address it (like H?).
Sample URL
