Help with url rewrite

The PHP code is not enough, you need to edit your .htaccess file correspondingly. (You can do this with $wp_rewrite->mod_rewrite_rules(); somehow, or edit it manually.) However, be aware that URL rewriting is complicated stuff – are you sure you need it? If you are using pretty permalinks for posts/pages, chances are this will bork it … Read more

Rewrite Query_Var URL Parameter with Slug

Your rewrite rule and query vars filter is wrong. Below is an example based on your query var my_taxoqueryvar function add_query_vars_filter( $vars ){ $vars[] = “my_taxoqueryvar”; return $vars; } add_filter( ‘query_vars’, ‘add_query_vars_filter’ ); add_action(‘init’, ‘myplugin_rewrite_rule’ ); function myplugin_rewrite_rule() { add_rewrite_rule( ‘results/([a-z]+)/?$’, ‘index.php?pagename=results&my_taxoqueryvar=$matches[1]’, ‘top’ ); }

Custom post type permalink structure

function myrules(){ add_rewrite_rule(‘^yourcptslughere/([^/]*)/([^/]*)/([^/]*)/?’,’index.php?p=$matches[1]&taxonomy=$matches[2]&name=$matches[3]’,’top’); } add_action(‘init’,’myrules’); Replace the ‘yourcptslughere‘ with what you wanted, and then add that to functions.php then flush your rewrite rules, and the final example you posted should work. I doubt it will be what the_permalink() returns however so you will have to construct the urls yourself, however they should be viewable at … Read more

help with rewrite_tag and rewrite_rule for custom page GET variables [duplicate]

You should use get_query_var rather than $_GET. But you will need to register you custom variables, for instance: add_filter(‘query_vars’, ‘register_my_query_vars’ ); function register_my_query_vars( $qvars ){ //Add these query variables $qvars[] = ‘video_id’; $qvars[] = ‘vide_title’; $qvars[] = ‘venue_src’; return $qvars; } Then you should be able to use get_query_var(‘venue_id’).

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