Manually setting share title not working
-
On custom post type archive pages we need to manually set the title and the URL to share, otherwise the plugin will use title and URL of the first post and not the archive page itself.
We do this by setting the parameters url and title.
[shariff url=”https://xxxx” title=”custom title”]The URL is working fine but the title does not. There are two small defects in shariff.php that we had to fix, please be so kind and include that in the project:
shariff.php line 575:
– if ( array_key_exists( ‘title’, $atts ) ) $share_title = urlencode( html_entity_decode( get_the_title(), ENT_COMPAT, ‘UTF-8’ ) );
+ if ( array_key_exists( ‘title’, $atts ) ) $share_title = urlencode( $atts[‘title’] );shariff.php line 1123:
– $subject = html_entity_decode( get_the_title(), ENT_COMPAT, ‘UTF-8’ );
+ $subject = $share_title;
- The topic ‘Manually setting share title not working’ is closed to new replies.