Can I see your register_post_type
line? Those are usually like: register_post_type( 'some-post-type', $args );
.
In this example, some-post-type
would be the ID that you use in get_post_type_archive_link( 'some-post-type' )
, not the rewrite slug yoga-event
.