tags:

views:

31

answers:

2

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

+1  A: 

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
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
does empty($id)===true ?? seems to be that is your problem, the argument is empty.
Javier Constanzo
A: 

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()));
Scott Kingsley Clark