I am filtering the_permalink to return a custom structure
function append_query_string($url) {
$url_endpoint = get_permalink();
$url_endpoint = parse_url( $url_endpoint );
$url_endpoint = $url_endpoint['path'];
return '#!'. $url_endpoint;
}
add_filter('the_permalink', 'append_query_string');
the filter above returns
#!/theme-folder/name-of-article
I need to remove the leading #! form that url and I had tried using get_permalink but I have found that the filter does not filter get_pemalink. I have checked the codex and I cannot find a filter for get_permalink. Do you know of a way to filter it so that it will match the_permalink? I can't use the_permalink because it outputs the information to the screen and breaks layout. I can't seem to assign it to a variable either.
