WordPress custom post type rewrite rule matches all pages returning 404

I managed to find a solution thanks to Milo‘s previous answers on other related questions. I found this particular post Remove base slug in CPT & CT, use CT in permalink to be extremely helpful. My initial CPT with grandparent relationship rewrite remains the same: function cpt_child(){ $args = array( //code ‘rewrite’ => array( ‘slug’ … Read more

how to use two permalinks for one custom post type based on categories

If anyone’s interested, the solution was quite close, I only had to specify the rewrite rule with &post_type=film : add_rewrite_rule( ‘projections_dvd/([^/]+)/?$’, ‘index.php?name=$matches[1]&post_type=film&is_projections_dvd=1’, ‘top’ ); I also changed the query vars to make it simpler : function wpd_query_var( $query_vars ) { $query_vars[] = ‘is_international’; $query_vars[] = ‘is_france’; $query_vars[] = ‘is_projections_dvd’; $query_vars[] = ‘categorie’; return $query_vars; } … Read more

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