[wp-trac] [WordPress Trac] #14383: Custom Permalink Structures Seem To Have Broken
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 21 23:22:05 UTC 2010
#14383: Custom Permalink Structures Seem To Have Broken
---------------------------+------------------------------------------------
Reporter: truthmedia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 3.0
Severity: normal | Keywords: rewrite, permalink, custom permalink, custom rewrite rules
---------------------------+------------------------------------------------
Changes (by truthmedia):
* cc: truthmedia (added)
Comment:
Following other examples in the codex, I've tried switching the code to
the following, still with the same result.
{{{
// Adding new rules
function sectioncats_add_rewrite_rules($rules)
{
$new_rules = array(
'[Ss]/([0-9]+)/tags/([^/]+)/page/?([0-9]{1,})/?$' =>
'index.php?' .
'tag=$matches[2]' .
'&paged=$matches[3]' .
'§ion_id=$matches[1]',
'[Ss]/([0-9]+)/tags/([^/]+)/?$' => 'index.php?' .
'tag=$matches[2]' .
'§ion_id=$matches[1]',
);
$return = $new_rules + $rules;
return $return;
}
add_filter('rewrite_rules_array','sectioncats_add_rewrite_rules');
function sectioncats_query_vars($public_query_vars) {
array_push($public_query_vars, 'section_id');
/* Note: you do not want to add a variable multiple times.
As in
the example above, multiple rules can use the same
variables
*/
return $public_query_vars;
}
add_filter('query_vars', 'sectioncats_query_vars');
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14383#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list