Edit_Ad.php

Discussion in 'ClassiCraft WordPress Theme' started by spottedvarennes, Feb 7, 2015.

  1. spottedvarennes

    spottedvarennes Member

    Joined:
    Jan 26, 2015
    Messages:
    79
    Likes Received:
    0
    You might want to finish the page edit_ad.php, its not completed, the Adresse, Longitude, Lattitude should be hidden, also you have to recreate the Categories selection you used on the Add New Ad page, Right now, on edit_ad.php, all Categories are mixed together and it shouldnt.

    Here's what I did to make the edit_AD.php categories selection to behave like the ADd new post page. Sorry its not really clean, but you'll get the Idea


    Code:
    <div class="row" id="ad-categories">                       
                    <div class="row" id="catlvl0">
                    <?php
               
                    $parents=getParents($ad->ID);
                    $parentId=$parents[0]->term_id;
                   
                        wp_dropdown_categories( 'show_option_none=' . __( 'Choisir une catégorie', 'appthemes' ) . '&class=dropdownlist&orderby=name&order=ASC&hide_empty=0&hierarchical=1&taxonomy=' . CUSTOM_CAT_TYPE . '&depth=1&selected=' . $parents[0]->term_id);
                        ?>
                    </div>
                    <?php
                    $counter=1;
                    $cates = wp_get_post_terms( $pid, CUSTOM_CAT_TYPE );
                    $catId= $cates[0]->term_id;
                 
                    foreach($parents as $key=>$parent)
                    {
                       
                        if($key >0)
                        {
                           
                            echo '<div id="catlvl' . $counter.'" level="' . ($counter).' class="childCategory row">';
                            wp_dropdown_categories( 'show_option_none=' . __( 'Choisir une sous-catégorie', 'appthemes' ) . '&child_of=' . $parentId .'&class=dropdownlist&orderby=name&order=ASC&hide_empty=0&hierarchical=1&taxonomy=' . CUSTOM_CAT_TYPE . '&depth=1&selected=' . $parent->term_id);
                            $parentId=$parent->term_id;
                            echo '</div>';
                            $counter++;
                        }
                       
                    }
                        echo '<div id="catlvl' . $counter.'" level="' . ($counter).'" class="childCategory row">';
                            wp_dropdown_categories( 'show_option_none=' . __( 'Choisir une sous-catégorie', 'appthemes' ) . '&child_of=' . $parentId .'&class=dropdownlist&orderby=name&order=ASC&hide_empty=0&hierarchical=1&taxonomy=' . CUSTOM_CAT_TYPE . '&depth=1&selected=' . $catId);
                        echo '</div>';
                   
                    ?>
                   
                </div>   
                <div class="row" id="ad-categories-footer">             
                    <div id="chosenCategory"><input id="cat" name="cc_category" type="hidden" value="<?php echo $catId;?>" /></div>
                   
                </div>  
     
  2. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello !

    We have noted down all of your suggestions and issues.
    We will try to fix all these issue as well as introduce all suggestions given by you in future updates


    Thanks & Regards
    Pramod Patel
     

Share This Page