Is there a reason that the refenced function does not encode correctly the URL of the blog start page (different from start page) but rather results in the address of the last post shown?
See links generated behind the sharing links in the middle text widget of http://www.pm-berger.de/blog.
For individual apges or posts the same function works correctly though.
since I am not a PHP expert at akll, perhaps you are able to help me out slightly more?
I have added the function
function my_get_permalink() {
global $post;
get_permalink($post->ID);
}
to the file functions.php of my child-theme.
Then I am trying to use <?php echo urlencode(my_get_permalink()); ?> instead of <?php echo urlencode(get_permalink()); ?> but the result is an empty string.