the_permalink
is a filter applied to the permalink URL for a post prior to printing by the function the_permalink.
Note: The output of the functions get_permalink
or get_the_permalink
is not filtered.
Append the query string for the current page to permalink URLs (uses add_query_arg):
function append_query_string($url) {
return add_query_arg($_GET, $url);
}
add_filter('the_permalink', 'append_query_string');
This filter is applied by: