How to Remove hashtags inside Tumblr Content

Tumblr creates it's hashtags differently than other social networks. This means that hashtags inside the content will remain inside the content even after the post has been shared:

To remove the hashtags from the content, and have the shared post instead look like this on Tumblr:

Option 1- You can download the following plugin:

Download: Site Specific- ROP Remove Hashtags From Tumblr Content

Option 2- DIY:

Start off by including the following code in either your child theme's functions.php file or create a site-specific plugin using the following plugin:

All you need to add is the plugin name and then copy the code below and enter it into the editing area, after pasting the code save your changes and head over to your Plugins area and activate the plugin to see the changes.

function rop_filter_tumblr_message($post_details, $hashtags){
	$hashtags_array = explode( ' ', $hashtags );
	$content = $post_details['content'];
	$content_replaced = str_replace( $hashtags_array, '', $content );
	$post_details['content'] = $content_replaced;
	return $post_details;
add_filter('rop_tumblr_custom_post_details', 'rop_filter_tumblr_message', 10, 2);

NOTE: This will remove ALL hashtags from the content. Including hashtags that are placed in the middle of the custom variation. Example:

"The #quick brown fox #hashtag1 #hashtag2" will turn into "The brown fox" so be sure to use this code if you're certain that you don't have hashtags inbetween the content of your share variation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.