check that the data exists before sending it to wpdb

Hi the error you are getting for $serializedpaisol variable because it is not define in function scope. the variable you define in specific scope can not access out form its scope; eg. { //example scope $var=10; } echo $var; // you will get undefined error. how you can fixed it? Solution // first define variable … Read more

Trash Bin for Categories?

i finded solution for this: add_filter( “cat_notice_row_actions”, ‘trash_row_actions’, 10, 2 ); function trash_row_actions( $actions, $user_object ) { // Remove the Edit action. unset( $actions[‘delete’] ); $catTrash = 10; $id = $user_object->term_id; $taxName = $user_object->taxonomy; $taxParent = $user_object->parent; // Add your custom action. $actions[‘update-parent’] = “<form action=’#’ method=’get’> <input type=”hidden” name=”taxonomy” value=”$taxName”> <input type=”hidden” name=”post_type” value=”noticia”> … Read more

How do I query a table?

Codex has extensive wpdb reference on how to perform different kinds of requests to database. However in most cases it is best to try to access data with available WP or theme/plugin code first.

Query and get meta as object(stdClass) on wp postmeta table?

I was wondering the same myself recently and this is the best solution I’ve come up with. First, declare a really simple class in your functions.php class Object { var $data = array(); public function __set($name, $value) { $this->data[$name] = $value; } public function __get($name) { return $this->data[$name]; } } This is the generic object … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)