Finally I found the solution.
I think the problem was because I didn’t specify the rewrite rules for taxonomy archive page manually because I thought that I just want some simple url (default) so I didn’t have to add the rewrite rule at all.
So I tried the following code and add some flush rules hooked during activation of the theme:
add_rewrite_rule('tax-1/([^/]+)/\?posttype1=([0-9]+)?$', 'index.php?tax-1=$matches[1]&posttype1=$matches[2]', 'top');
The Monkeyman Rewrite Analyzer stating the following was also very helpful that I thought of that way:
This query variable is not public and will not be saved
It thus brought me to this link: How to properly rewrite url by custom var
Related Posts:
- Custom taxonomy terms as children of multiple custom post types
- post_type_link Filter – Too Few Arguments
- how to get this tax_query working?
- Custom Taxonomy Search result page
- Show Taxonomies with admin area for custom post type?
- How to get_term_meta on single custom post?
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Many to many to many custom post relationships
- Include custom post type custom taxonomies in Categories widget
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- Add term slug in URL of custom post type details page
- Custom Post Type Advanced Slug
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- How to fetch custom post types with its full data on wordpress?
- WordPress custom permalink and archive link for custom post type
- Reusable metabox backend and frontend
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- How to rewrite the post slug of a custom post type post
- Get custom term meta problem on single post type
- Custom post type name and assigning custom taxonomy
- Urls in Custom Post Type work for Terms but not for its Taxonomies
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Building a Portfolio and need some direction
- Modifying rewrite rules to use /category//
- Custom Post Type View Button in Admin Gives 400 Error
- Custom post types category
- Taxonomy rewrite pagination 404
- Archive page for custom post type and custom taxonomy
- Custom Post Type URL Rewrite’s
- Custom Taxonomy dont save in a frontend form for post a custom post
- Why does my URL keep returning 404 error code?
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Should i use custom post type for a custom footer?
- Order custom posts by taxonomy, then by meta_key
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- custom post archive URL is wrong
- Writing a custom Glossary plugin
- Custom taxonomy and post type rewrite rules
- How can I tell if I’m on a custom post type archive page?
- Custom Post Type and Taxonomy Rewrite Error
- How do I ensure that post_type and Taxonomy use the same slug?
- add_filter get array data before display in custom post_type
- Remove cpt slug from url and use custom taxonomy instead breaks all other cpt
- ACF – Retrieve custom taxonomy from a relationship field
- How to store the third party script with HTML code in the wordpress custom input field?
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Getting Same Description in All the Custom Taxonomy Posts
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- Error 404 change permalink term custom term taxonomy
- Custom post type 404 category page
- Custom Post Type & Taxonomies – Rewrite
- Remove custom permalink base from CPT custom category and custom tags
- Display Posts that fit a certain criteria on Category pages
- How to properly set the rewrite rules for this case?
- How to handle this wordpress custom post type rewrite problem?
- How to display custom field in product description?
- Define multiple prefixes for custom post type
- How to search through all child taxonomies using WP_Query?
- I have a random letter appearing before my content. Where to start looking for the cause?
- Display Custom Field or Custom Taxonomy in front page /post/product
- wp_insert_post deleting previous post custom meta
- Custom Post Taxonomy Template Not Loading Properly
- Display CPT taxonomies as an archive page
- PHP Warning with Custom Fields
- I want to create a metabox under custom taxonomy
- Change CPT permalink to use the category
- Problem with multi checkboxes value in metabox?
- How to fix 404 on post after prepending Custom Post Type url with Custom Taxonomy Term slug
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- Redirect Custom Post Type from Child Taxonomies
- How to display only child category post in related posts in custom post type?
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- Customise Permalink Structure For Custom Post Types
- Adding a Section for Visitors
- Custom post type structure + permalink structure
- Query posts by multiple custom fields
- Custom URL for Custom Post Type & Custom Taxonomy Term
- Custom taxonomy template for custom fields loop [closed]
- Custom taxanomy and custom post type – pagination leads to 404
- Register post type getting error 404
- Flush rewrite rules when new cpt is registred
- How to build overlapping custom post_type and taxonomy rewrites without conflicts?
- Custom post type that lets users create a set of posts?
- Create Inclusions and exclusions
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- What’s the most efficient way to get two queries based on an if statement?
- WordPress is giving a warning but my code is working fine
- Help with Multi Level Category Archive Page
- I have a custom taxonomy assigned to two post types. How do I create URLs for different term archives for each post type?
- CPT url rewriting : regular posts return 404 error
- Custom Post Type rewrite url to /category/pagetitle [duplicate]
- Remove custom post type slug but keep related category taxonomy permalink
- Need some suggestion/help with custom post types project
- page not found for example.com/custom-post-name
- Best way to use Category & Custom Fields?
- Force WordPress to only match URL in category
- Custom post type with custom taxonomy permalinks