Separate posts by chapter per rewrite

Since rewrite topics is something requiring tedious testing and time. And it is not something that 1 answer – 1 code complete because it involves many unknown factors from the asker such as how does the post type is created, settings in query_var which affects the query param is there any plugins involved what other … Read more

why is are these rewrite_tags and rules not working?

Your rewriterules arn’t correct anymore. You changed add_rewrite_rule(‘^video/([^/]*)/([^/]*)/[^/]*)’, ‘index.php?pagename=video&video_id=$matches[1]&video_src=$matches[2]&video_title=$matches[3]’, ‘top’); To add_rewrite_rule(‘^video/([^/]*)/([^/]*)/[^/]*)’, ‘video/&video_id=$matches[1]&video_src=$matches[2]&video_title=$matches[3]’, ‘bottom’); The correct rewriterules for your pages are: Video add_rewrite_rule(‘^video/([^/]*)/([^/]*)/[^/]*)’, ‘index.php?pagename=video&video_id=$matches[1]&video_src=$matches[2]&video_title=$matches[3]’, ‘top’); Team add_rewrite_rule(‘^videos/team/([^/]*)/([^/]*)’, ‘index.php?pagename=videos&team_id=$matches[1]&team_slug=$matches[2]’, ‘top’); League add_rewrite_rule(‘^videos/league/([^/]*)/([^/]*)’, ‘index.php?pagename=videos&league_id=$matches[1]&league_slug=$matches[2]’, ‘top’); For team and league I assumed your WordPress page is “videos”. If it is the subpage then you have to change “pagename=videos” … Read more

WP Rewrite the last two parts of the URL

I have finally solved my rewrite rule problem. I used the class outlined in the answer of this wordpress.stackoverflow question. After including that class I used the following code to make it work: // These query vars can be retrieved on the page by using get_query_var( ‘queryvar1’ ); $options = array( ‘query_vars’ => array( ‘queryvar1’, … Read more

Rewrite url / permalink for default archive – yearly / monthly

You can do this without adding rewrite rules by changing the $date_structure of the $wp_rewrite instance of the WP_Rewrite class: function wpa116030_init(){ global $wp_rewrite; $wp_rewrite->date_structure=”about/blog/archive/%year%/%monthnum%/%day%”; } add_action( ‘init’, ‘wpa116030_init’ ); Visit your Permalinks settings page after adding this code to flush the rewrite rules.

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