Jump to content

Recommended Posts

 

 

I had created this plugin with some help here, but somehow it's been lost from my local drive and server (computer change, as well as an unrelated accidental deletion of files from my server).

 

Here is what I'm trying to do:

Author writes Post and puts in Tags (usually names of basketball players).

Plugin gets the Tag ID and Slug.

Plugin copies the Tag ID to the matching name in a separate data table.

 

I've activated the plugin and tested it. I'm not getting any errors, but it's not updating the other data table.

 

 

function save_post($post_ID)
{
mysql_select_db("jwrbloom_hhr");

$wp_tagID = get_query_var('tag_id');
$wp_slug = get_query_var('tag');

$query ="UPDATE wp_playerRank SET wpID = '$wp_tagID' WHERE wpSlug = '$wp_slug'";

   return $post_ID;
}

add_action('publish_post', 'save_post');

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.