Site logo

Archived topic

Redirect Author Archive Links

1 reply · Started by Mihail on February 19, 2023

Viewing posts 1–2 of 2

Hi Mihail,

The snippet you added won't work in your case.

Can you try this snippet:

add_filter( 'generate_dynamic_element_url', function( $url, $link_type, $source, $block ){
	if ( ! empty( $block['attrs']['className'] ) && strpos( $block['attrs']['className'], 'replace-url' ) !== false  ) {
		$url = 'https://google.com';
	}
	return $url;
},15,4);

Add replace-url to the class list of the Headline Block.

Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/

Replace https://google.com with your About page link.

This archived topic is closed to new replies.