WordPress Post Tags, Twitter Hashtags and Publicize
-
I think I found a way to automatically convert WordPress Post tags to Twitter hashtags for use with the Publicize feature of JetPack.
I’m familiar with PHP but have little experience with how WordPress hooks and actions work.
Perhaps someone can help me make this work consistently.
I used the Functionality plugin to create my own plugin. That plugin has the following code.
<?php /* Plugin Name: Island in the Net Plugin URI: http://islandinthenet.com Description: A site-specific functionality plugin for Island in the Net where you can paste your code snippets instead of using the theme's functions.php file Author: Khürt Williams (Admin) Author URI: http://islandinthenet.com Version: 2015.02.06 License: GPL */ // Create custom Publicize message // Source https://wordpress.org/support/topic/jetpack-publicize#post-4836869 function islandinthenet_cust_pub_message() { //get current post $post = get_post(); if ( !empty( $post ) ) { // grab the tags $post_tags = get_the_tags( $post->ID ); if ( !empty( $post_tags ) ) { //convert post tags array to hash tag string $hash_tags = sprintf("#%s",implode(" #", $post_tags)); $previous_cust = get_post_meta( $post->ID, '_wpas_mess', true ); $custom_message = $previous_cust.' '.$hash_tags; // append tags to custom message update_post_meta( $post->ID, '_wpas_mess', $custom_message ); } } } // Save that message function islandinthenet_cust_pub_message_save() { add_action( 'save_post', 'islandinthenet_cust_pub_message' ); } add_action( 'publish_post', 'islandinthenet_cust_pub_message_save' );The blog I need help with is: (visible only to logged in users)
-
Hi there,
We provide support here only for blogs hosted by WordPress.COM and no others and that site is not among them.WordPress.COM and WordPress.ORG are completely separate and have different logins, features, run different versions of some themes with the same names, and have separate support forums. Read the differences here http://en.support.wordpress.com/com-vs-org/
WordPress.org support docs are at https://codex.wordpress.org/Main_Page
Some JetPack solutions are here http://jetpack.me/support/
Others are in the JetPack support forum at WordPress.org
http://wordpress.org/support/plugin/jetpackIf you don’t have a username account at WordPress.ORG click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, so you can post to the Theme support forums there.
However, if you can’t find help at either one then you can file a JetPack support ticket here > http://en.support.wordpress.com/contact/?jetpack=needs-service
-
Hi @timethieft. Thanks for the response.
Just so I am clear. Should I ask for help on http://jetpack.me/support/ or http://wordpress.org/support/plugin/jetpack?
-
I would register a WordPress.ORG account and post to https://wordpress.org/support/forum/plugins-and-hacks
-
-
- The topic ‘WordPress Post Tags, Twitter Hashtags and Publicize’ is closed to new replies.