add_action(‘wp_ajax_[action name]’, myfunction) problem

There are only three explanations for why this isn’t working:

First, something could be unregistering your action. That doesn’t seem very likely, though.

Second, your code never runs in the ajax initialization.

Third, the wp_ajax_my_function_call hook never runs.

I wouldn’t worry about the possibility of the first.

As far as the second, just make sure your code is run before wp_loaded, as anything after that (i.e. template_redirect, wp, pre_get_posts) isn’t run in an ajax load.

For the third, just make sure you’re posting your ajax request to wp-admin/admin-ajax.php.

Also, if you haven’t already, I’d suggest giving a quick read to admin-ajax.php and wp-settings.php.

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