New answers tagged

0

You can edit the slug for most content types. Check your sidebar when you have it open for editing - it should look something like this: Moreover, some SEO plugins (like Yoast) also allow you to specify a slug. If you change the slug (and thus the URL to pages) you might want to use some sort of redirect plugin that can catch changes and redirect incoming ...


0

So that's the cause. Thanks a lot, Saly CJ. The answer is by Sally CJ's using the wrong text domain (theme-slug) in theme_slug_widgets_init() - and the correct text domain is ayabil2 (sorry Sally CJ, can't seem to add your reply as answer)


1

As SallyCJ mentioned, gettext is really the only option you have with this, because the Slug labels are hardcoded in the Core of WordPress. https://core.trac.wordpress.org/browser/tags/5.2/src/wp-admin/edit-tags.php#L439 Here is a snippet I wrote and tested that should work for you, and it will only run on the backend and only on the two pages where you ...


0

function gp_remove_cpt_slug( $post_link, $post ) { if ( 'race' === $post->post_type && 'publish' === $post->post_status ) { $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); } return $post_link; } add_filter( 'post_type_link', 'gp_remove_cpt_slug', 10, 2 ); At this point, ...


Top 50 recent answers are included