how to implement AJAX in wordpress themes

I am going to show you how we can implement Ajax in our WordPress themes with the help of simple example.
Article is at 1stwebdesigner

Posted on
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 383
Categories PHP

Deprecated: Creation of dynamic property WP_Query::$comments_by_type is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/comment-template.php on line 1528

2 thoughts on “how to implement AJAX in wordpress themes”

  1. hello Adnan,

    this is regarding the article u posted” How to Implement Ajax in WordPress Themes ”
    in the template file i added this custom taxonomy called state

    ” wp_dropdown_categories(‘show_count=0&selected=-1&hierarchical=1&depth=1&hide_empty=0&exclude=1&show_option_none=Main Categories&name=main_cat&taxonomy=state’); ”

    now im able to populate the taxonomy terms in the drop down, but when i give the sub taxonomy(child) of the state, in here

    ” $categories= get_categories(‘child_of=’.$_POST[‘main_catid’].’hide_empty=0&taxonomy=city’); ”

    the drop down does not populate the child taxonomies, but the 2nd drop down is in active when i select the 1st drop down.

  2. Sorry Little correction i have the following structure

    * Animals

    Dog
    Cat
    Tiger
    Lion

    * Vehicles

    Scooter
    Bike
    Car
    Truck

    im getting the 1st drop down as Animals and Vehicles, when i select Animals im not getting the sub cat values, i changed the code in
    ” $categories= get_categories(‘child_of=’.$_POST[‘main_catid’].’hide_empty=0&taxonomy=city’); ” to as
    ” $categories= get_categories(‘child_of=’.$_POST[‘main_catid’].’hide_empty=0′); ”

    still it does not populate the sub cats. but when i increased the depth –> 2 in
    ” wp_dropdown_categories(‘show_count=0&selected=-1&hierarchical=1&depth=2&hide_empty=0&exclude=1&show_option_none=Main Categories&name=main_cat&taxonomy=state’); ”

    im getting this in the 1st drop down

    * Animals

    Dog
    Cat
    Tiger
    Lion

    * Vehicles

    Scooter
    Bike
    Car
    Truck

Leave a Reply

Your email address will not be published.