Display content according to current URL

For this to work, you would have to add a rewrite that rewrites https://example.com/[manufacturer slug]/[brand slug] to index.php with e.g. manufacturer=[manufacturer slug]&brand=[brand slug]. e.g.: add_filter( ‘rewrite_rules_array’,’jf_insert_rewrite_rules’ ); function jf_insert_rewrite_rules( $rules ) { $newrules[‘^(.*)/(.*)/?$’] = ‘index.php?manufacturer=$matches[1]&brand=$matches[2]’; return $newrules + $rules; } Remember to goto permalinks page and hit save for the rewrite rules to be updated. … Read more

attachment url rewrite

Actually, you can always just use a query parameter, even if you have the “pretty” permalinks enabled. So instead of /category/sub-category/article.html/attachment/image you can go to /?attachment=image. The only case when this “breaks down” is when you go to /category/sub-category/article.html?attachment=image, because WordPress gets confused: it tries to query for a post and an attachment at the … Read more

Is dynamic URL possible in WordPress

Not completely sure I understand what you mean with that the parameters fall under a page job, but if you mean that different contents are loaded on the same page using javascript / ajax, you could use https://github.com/browserstate/history.js/ to generate the corresponding url for each state. Difficult to say more about how you could implement … Read more

Possible to create a permalink to sort with meta_key?

What about something like that? function wpse139657_orderby(){ if( isset($_GET[‘orderby’]) ){ $order = $_GET[‘order’] or ‘DESC’; set_query_var(‘orderby’, ‘meta_value_num’); set_query_var(‘meta_key’, $_GET[‘orderby’]); set_query_var(‘order’, $order); } } add_filter(‘pre_get_posts’,’wpse139657_orderby’); In this way you can call your urls with a ?orderby=rank suffixed and it should do the trick. You can also have an optional order parameter, should you want to implement … Read more

Search results URL without query string variables

It’s better to share some of your code that already you used. And you mention first line that you have search page ? what exactly you mean by that ? WordPress have default search page did you mention that one ? if you are then try this code function change_search_url_rewrite() { if ( is_search() && … Read more

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