How can i have a custom post type with more slugs for each post?

Yes you can do this with a custom rewrite. I am doing the same for a custom post type, in my case profile. So my URL = domain.com/profile/some-custom-slug. Dynamically I create /meet-me behind it, so it becomes domain.com/profile/some-custom-slug/meet-me. The real address of the contact page is domain.com/profile/some-custom-slug/?meet=true (or something else unique). function wpse343933_todo() { add_rewrite_rule( … Read more

How to edit URL Slug?

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 … Read more

Access the same page from multiple urls (wildcard)

You can use template_include, but before you hook to this filter you must do the following steps: Create page template. e.g: page-target.php <?php /** * Template Name: Page Target */ … Manually query the contents of target-page on page-target.php template, because the global $post will be referencing to your some-prefix-* page. (Optional): Edit and apply … Read more

How to change the category url jusy show /category/%category_id% in wordpress?

I find my answer on the internet. function numeric_category_rewrite_rules( $rules ) { $custom_rules = array(); foreach ( $rules as $regex => $rewrite ) { $regex = str_replace( ‘/(.+?)/’, ‘/([0-9]{1,})/’, $regex ); $rewrite = str_replace( ‘?category_name=”, “?cat=”, $rewrite ); $custom_rules[ $regex ] = $rewrite; } return $custom_rules; } add_filter( “category_rewrite_rules’, ‘numeric_category_rewrite_rules’ ); function numeric_category_link( $category_link, $term_id … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)