Hook for a URL
-
Hello, I have set such address entries:
/%category%/%postname%.html
A reference of the ILA are:
/%category%/%postname%.html?amp
I have to edit each time you update the templates if you can add a plug-in as well as in the main AMP plug-in to be able to use the same hook:
function my_amp_get_permalink( $link ){ $link = preg_replace('#/amp$#uis', '?amp', $link); return $link; } add_filter( 'amp_get_permalink', 'my_amp_get_permalink' );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Hook for a URL’ is closed to new replies.