Pretty Filter URL

Here is my current code: function hm_base_date_query_vars($vars) { $vars[] = ‘base_date’; return $vars; } add_filter(‘query_vars’, ‘hm_base_date_query_vars’); function hm_base_date_rewrite_rule() { add_rewrite_rule( ‘^my-calendar/([^/]*)/?’, ‘index.php?pagename=my-calendar&base_date=$matches[1]’, ‘top’ ); } add_action(‘init’, ‘hm_base_date_rewrite_rule’, 10, 0); $base_date_test = get_query_var(‘base_date’); on the url example.com/my-calendar/foo my var $base_date_test returns null Maybe someone can help me. Thanks. // Edit: It works. I tried to call … Read more

Woocommerce Custom Rewrite Rules Array – Subcategories

Try this add_filter( ‘rewrite_rules_array’, function( $rules ) { $new_rules = array( ‘services/([^/]*?)/page/([0-9]{1,})/?$’ => ‘index.php?product_cat=$matches[1]&paged=$matches[2]’, ‘services/([^/]*?)/?$’ => ‘index.php?product_cat=$matches[1]’, ‘services/([^/]*?)/([^/]*?)/?$’ => ‘index.php?product_cat=$matches[2]’ ); return $new_rules + $rules; } );

Taxonomy Rewrite Problem

I would think that .com/genre/comedy is actually picked up by the second rule since it matches that as well, and because it is added first I think it takes precedence. You could try to swap the order, so it goes 3, 4, 1, 2. For production, you might want to remove flush_rewrite_rules();, I believe it’s … Read more

create user’s view profile link with username

Please find out following answer: add_action(‘init’,’change_all_permalinks’); function change_all_permalinks() { global $wp_rewrite; $wp_rewrite->author_base=””; $wp_rewrite->author_structure=”/%author%”; } After add this code in functions.php you need to go permalink settings and press on save changes button,without change anything in permalinks and then check frontend url ‘www.yoursite/admin/’.

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