Change post-name when inserting new Post if Specific Category is selected in WP

You can use the wp_insert_post_data filter, and check the post_category array for your category ID. (If $update is false, you’ll know it’s a new post being added, not an existing post being edited.) Something like this should work. add_filter( ‘wp_insert_post_data’, ‘wpse414180_maybe_change_slug’, 10, 4 ); /** * Changes the slug on posts in the Poetry category. … Read more

wordpress shortcode url decode non Latin character

It makes sense to look at the PHP function rawurldecode, which decodes URL-encoded strings. https://www.php.net/manual/en/function.rawurldecode.php For example, echo rawurldecode(get_permalink($post->ID)); will show the decoded post URL. But this isn’t really needed in hyperlink code. Sorry I didn’t just write a comment, I don’t have enough points for that option.

Create a custom plugin with dynamic child pages listing database records

A basic implementation could go like this: Setup public query variables This lets you fetch these later through get_query_var() add_filter( ‘query_vars’, function( $vars ) { $vars[] = ‘team_category’; $vars[] = ‘team_id’; return $vars; } ); Add a rewrite rule This is responsible for turning a url like /team/allstars/999 into a format WordPress can handle. Make … Read more