custom url with add_rewrite_rule
-
Hi,
I have a custom url with add_rewrite_url and custom query_vars. Total Cache does not cache the url’s. Is it normal? Is there any way to indicate Total cache to cache this url’s?add_rewrite_rule("heritageobject/([^/]*)$",
'index.php?coeli_endpoint=heritageobject&coeli_slug=$matches[1]',
'top'
);
add_filter( 'query_vars', function ( $query_vars ) {
$query_vars[] = 'coeli_endpoint';
$query_vars[] = 'coeli_slug';
return $query_vars;
} );
function fitxa_redirect( $template ) {
if ( get_query_var( 'coeli_slug' ) ) {
$endpoint = strtolower( coeli_get_endpoint_from_custom_slug( strtolower( get_query_var( "coeli_endpoint" ) ) ) );
$custom_template = COELI_PATH . 'templates/record.php';
return $custom_template;
}
return $template;
}thanks in advance
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.