How to write ReWrite Rule to cut URL?

First add the rewrite rule:

function wpse426504_add_rewrite() {
    add_rewrite_rule( 'mycontent/events/([a-z0-9-]+)[/]?$', 'index.php?eventslug=$matches[1]', 'top' );
}

add_action( 'init', 'wpse426504_add_rewrite' );

function wpse426504_add_query_var( $query_vars ) {
    $query_vars[] = 'eventslug';
    return $query_vars;
} );

add_filter( 'query_vars', 'wpse426504_add_query_var' );

That’s the basics of it. If you need to add a new template to handle displaying everything, you’d then hook to template_redirect.

deneme bonusu veren sitelerbahis siteleripulibet girişdeneme bonusutürkçe altyazılı pornocanlı bahis casinocanlı bahis casino siteleriOnwin Güncel Girişholiganbetholiganbet girişholiganbet güncel giriş