Custom Taxonomy and Rewrite URL

Isn’t what you are trying to achieve the point of the rewrite slug? e.g. if you have a news category as press and another as event then simply changing register_taxonomy(‘news_category’, ‘stfp_news’, array( ‘hierarchical’ => true, ‘show_admin_column’ => true, ‘label’ => __(‘Categories’), ‘show_ui’ => true, ‘query_var’ => false, ‘rewrite’ => array( ‘slug’ => ‘about/news/category’), ‘singular_label’ => … Read more

Multiple query vars sorting combination and url rewrite

Well, I explain here what I finally did to sort this out. I haven’t found a proper way to do so but: I created a rewrite function that retrieves all parameters and generates a final URL with the parameters ordered in a specific way. function sc_change_programs_search_url_rewrite() { if(get_query_var( ‘post_type’ ) == ‘program’) { if(isset($_GET[‘word_search’]) || … Read more

Help with rewrite rules for two post types

The first rule is capturing all requests. If you add a $ anchor at the end of the rules, they’ll behave as expected (you could also just switch the order of the rules so the more specific one “wins”). add_rewrite_rule( ‘^app/course/([^/]+)/?$’, ‘index.php?page_id=3400&course=matches[1]’, ‘top’ ); add_rewrite_rule( ‘^app/course/([^/]+)/theme/([^/]+)/?$’, ‘index.php?page_id=3400&course=$matches[1]&theme=$matches[2]’, ‘top’ ); Check out Monkeyman Rewrite Analyzer for … Read more

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