0

does any one have any suggestions on deleting pod items in wordpress using triggers such as a button click or something similiar?

Adrian Heine
  • 4,051
  • 2
  • 30
  • 43
ayush
  • 14,350
  • 11
  • 53
  • 100

2 Answers2

1

I think he/she is talking about the Pod CMS plugin. There's a drop_pod method in the API, so you just need to call it when you click some button or something.

Javier Constanzo
  • 443
  • 1
  • 4
  • 16
  • Ya. I am talking about the Pod CMS plugin. @Javier- I tried using the drop_pod_item method but i get an error. I am using the following code - $id = 3; $params = array( 'pod_id' => $id ); $api = new PodAPI( 'product' ); $api->drop_pod_item($params); But i get the following error- Error: SQL failed; SQL: SELECT pre_drop_helpers, post_drop_helpers FROM wp_pod_types WHERE id = ; Response: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 – ayush Jun 01 '10 at 08:35
  • does empty($id)===true ?? seems to be that is your problem, the argument is empty. – Javier Constanzo Jun 01 '10 at 18:01
1

Are you still having issues with this? $id isn't the same as the pod_id.

Try this:

<?php
$id = 3;
$Record = new Pod('product',$id);
$api = new PodAPI();
$api->drop_pod_item(array('pod_id'=>$Record->get_pod_id()));