so I added
if( is_main_site()) { $slug = 'uniquename'; } else { $slug = 'uniquenametwo'; }
and
'rewrite' => array('slug' => $slug ),
inside register_post_type function and it worked. before i tried outside it. Im new to this.
Anyway this worked in my case.
Related Posts:
- Display all posts in a custom post type, grouped by a custom taxonomy
- Programmatically publish a post (custom post type) with custom fields
- Get list of registered custom post types
- Echo all meta keys of a custom-post TYPE
- Ordering Posts List By Taxonomy Terms?
- Change slug of registered custom post type in child theme
- Custom post type permalink changing itself every other change
- WordPress Custom Shortcode Conflicting with Media Library
- Creating a gallery custom post type?
- Custom post type archive with pagination?
- Custom post type archive with dynamic taxonomy filtering – is it possible
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Add common Post Actions to Custom Meta Column
- Adding menu_order to CPT admin page
- Custom post type with specific category structure
- reference the current category being used in the category.php page
- Add custom post type archives to search results?
- CPT Meta Searching
- Custom Post Type not visible on category page
- Rewrite URL for only archive page (custom post type)
- Show Post Thumbnail In Custom Post From Other CPT
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Add category attribute to custom shortcode
- Is possible add class for last post of Custom Post Type?
- How to customize a permalink (URL) structure?
- Custom post type unintentionally called in every page
- Using Same Slug With Multiple Post Types
- Multiple featured sizes / images / excerpts
- Does WordPress consider a post name unique if that same post name is in multiple Post Types?
- PHP variable not regenerating when publishing multiple posts at the same time
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- Querying Two Custom Post Types with OR Not Working
- how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?
- Sort and filter custom post type posts by custom taxonomy
- Use image gallery like woocommerce in custom post type
- Posts per row on archive page (custom post type)
- Filter widget outputs
- Get post_type by term_id
- How to keep a CPT from being visible on the front end?
- Custom Empty Results page for my Custom Post Type
- How to have permalink like domain.com/term/postname?
- List Posts By Custom Taxonomy
- Building Forums with Custom Post Types
- Custom Query: If One Post Object Field Value Is The Same As Another
- Custom Columns for Custom Post Type Manager
- Group Custom post type in a taxonomy page by its child taxomony
- sort by name (slug) custom post type
- wp_dropdown_pages with tax_query clause
- Cache issue with WP_Query and custom field filtering
- Custom Post Type nest under a normal WordPress Page
- Building tags and archive using meta from custom post type
- How to save TinyMCE fields on WordPress custom post type?
- How to display post from one custom post type in another custom post type with the same taxonomy?
- Display all Categories except ones with a specific parent
- Metabox collapsed by default
- List taxonomies by post id
- Modify Publish Metabox location on CPT
- Convert category to custom post type
- subtracting the current post form then whole loop, which is generating all CPT titles
- Custom Function to redirect singular post if specific meta field is empty
- How to mix 2 kinds of post types
- Help with Travel Guide Setup
- How to shows CPT which has specific meta key?
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Show custom post type under last posts configuration
- Custom post type taxonomy template and URL confusion
- custom post type loop
- Custom Post save causes 500 error
- Optimise custom post type queries
- Archive page of filtered posts
- Custom post type child of custom post type
- delete custom post type using a submit form
- Custom post type navigation – 404 on page 2
- Problem with custom post type search
- Allow certain part of a page to be easily updated for client?
- Custom post type is_singular condtional not working when managing sidebar display
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Delete old thumbnail when updating new
- get_the_post_navigation not working
- Display ACF object field data using Elementor Custom Query
- Changing to different post type maintains the redirection?
- Sortable admin columns ordering from custom fields isn’t combine com search and Dropdown filter
- Calling custom taxonomies
- WordPress custom field sorting, weird behavior: the latest post is at the end
- Limit taxonomy terms added to a custom post type
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes
- Issue displaying multiple TinyMCE editors with WPAlchemy
- Default WordPress Query for a Specific Custom Post Type URL
- Custom order of CPT posts by title, in wp-admin area by default
- Sort ACF by custom taxonomy
- Custom post type with custom parent prefix slug
- Is it possible to use a post name in a custom post slug?
- How do I add the “orange counter” next to a Custom Post Type?
- Custom slugs with dates & IDs on Custom Post Type
- using jetbooking for multiple custom post types
- Custom post type pagination conflict result in 404
- Dynamically count the number of custom post types associated to a custom taxonomy
- Add post id to url instead of WordPress default -2 suffix
- How to consume external API from WordPress post editor and display the response data in the custom field?
- Taxonomy Archive URL + Template