Skip to main content
added 30 characters in body
Source Link
Johansson
  • 15.4k
  • 11
  • 43
  • 79

I bought I real estate theme, I need a child category for Community custom taxonomy so i set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE"

"Business Bay, Business Tower, Dubai, UAE"

instead of "Business Tower, Business Bay, Dubai, UAE",

"Business Tower, Business Bay, Dubai, UAE"

Business towers is the child, Business bay is the parent. It should be child first before the parent right? 

can you please help me.   

here is the screeshot when i display the communityhere is the screenshot when i display the community 

Here is the code:

I bought I real estate theme, I need a child category for Community custom taxonomy so i set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE" instead of "Business Tower, Business Bay, Dubai, UAE", Business towers is the child, Business bay is the parent. It should be child first before the parent right? can you please help me.  here is the screeshot when i display the community Here is the code:

I bought I real estate theme, I need a child category for Community custom taxonomy so i set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays:

"Business Bay, Business Tower, Dubai, UAE"

instead of

"Business Tower, Business Bay, Dubai, UAE"

Business towers is the child, Business bay is the parent. It should be child first before the parent right? 

can you please help me. 

here is the screenshot when i display the community 

Here is the code:

some modifications
Source Link

Hello I am new in wordpress, I just have a question hope you can help me guys.

I broughtbought I real estate theme, I need a child category for Community categorycustom taxonomy so I justi set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE" instead of "Business Tower, Business Bay, Dubai, UAE", Business towers is the child, Business bay is the parent. It should be child first before the parent right? can you please help me. here is the screeshot when i display the community Here is the code:

Hello I am new in wordpress, I just have a question hope you can help me guys.

I brought I real estate theme, I need a child category for Community category so I just set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE" instead of "Business Tower, Business Bay, Dubai, UAE", Business towers is the child, Business bay is the parent. It should be child first before the parent right? can you please help me. here is the screeshot when i display the community Here is the code:

I bought I real estate theme, I need a child category for Community custom taxonomy so i set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE" instead of "Business Tower, Business Bay, Dubai, UAE", Business towers is the child, Business bay is the parent. It should be child first before the parent right? can you please help me. here is the screeshot when i display the community Here is the code:

I added some more details
Source Link

I brought I real estate theme, I need a child category for Community category so I just set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE" instead of "Business Tower, Business Bay, Dubai, UAE", Business towers is the child, Business bay is the parent. It should be child first before the parent right? can you please help me. Herehere is the screeshot when i display the community Here is the code:

    $communitylabels = array(
            'name' => __( 'Community', 'contempo' ),
            'singular_name' => __( 'Community', 'contempo' ),
            'search_items' =>  __( 'Search Communities', 'contempo' ),
            'popular_items' => __( 'Popular Communities', 'contempo' ),
            'all_items' => __( 'All Communities', 'contempo' ),
            'parent_item' => __( 'Parent', 'contempo' ),
            'parent_item_colon' => __( 'Parent', 'contempo' ),
            'edit_item' => __( 'Edit Community', 'contempo' ),
            'update_item' => __( 'Update Community', 'contempo' ),
            'add_new_item' => __( 'Add New Community', 'contempo' ),
            'new_item_name' => __( 'New Community', 'contempo' ),
            'separate_items_with_commas' => __( 'Separate Communities with commas', 'contempo' ),
            'add_or_remove_items' => __( 'Add or remove Communities', 'contempo' ),
            'choose_from_most_used' => __( 'Choose from the most used Communities', 'contempo' )
        );
        register_taxonomy( 'community', 'listings', array(
            'hierarchical' => true,
            'labels' => $communitylabels,
            'show_ui' => true,
            'query_var' => true,
            'rewrite' => array( 'slug' => 'community' ),
        ));
    }

    if ( ! function_exists( 'community' ) ) {
        function community() {
            global $post;
            global $wp_query;
            $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'community', '', ', ', '' ) );
            echo esc_html($terms_as_text);
        }
    }

Here is the code when i call the custom taxonomy:

      // Title
        case 'listing_title' :

           echo '<h2 class="marT5 marB0">';
                ct_listing_title();
            echo '</h2>';
            
        break;

        // location
        case 'listing_city_state_zip' :

            echo '<p class="location marB0">';  
            community();
            echo ', ';     
                city();
                echo '';
                country();
               
            echo '</p>';

I brought I real estate theme, I need a child category for Community category so I just set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE" instead of "Business Tower, Business Bay, Dubai, UAE", Business towers is the child, Business bay is the parent. It should be child first before the parent right? can you please help me. Here is the code:

    $communitylabels = array(
            'name' => __( 'Community', 'contempo' ),
            'singular_name' => __( 'Community', 'contempo' ),
            'search_items' =>  __( 'Search Communities', 'contempo' ),
            'popular_items' => __( 'Popular Communities', 'contempo' ),
            'all_items' => __( 'All Communities', 'contempo' ),
            'parent_item' => __( 'Parent', 'contempo' ),
            'parent_item_colon' => __( 'Parent', 'contempo' ),
            'edit_item' => __( 'Edit Community', 'contempo' ),
            'update_item' => __( 'Update Community', 'contempo' ),
            'add_new_item' => __( 'Add New Community', 'contempo' ),
            'new_item_name' => __( 'New Community', 'contempo' ),
            'separate_items_with_commas' => __( 'Separate Communities with commas', 'contempo' ),
            'add_or_remove_items' => __( 'Add or remove Communities', 'contempo' ),
            'choose_from_most_used' => __( 'Choose from the most used Communities', 'contempo' )
        );
        register_taxonomy( 'community', 'listings', array(
            'hierarchical' => true,
            'labels' => $communitylabels,
            'show_ui' => true,
            'query_var' => true,
            'rewrite' => array( 'slug' => 'community' ),
        ));
    }

    if ( ! function_exists( 'community' ) ) {
        function community() {
            global $post;
            global $wp_query;
            $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'community', '', ', ', '' ) );
            echo esc_html($terms_as_text);
        }
    }

I brought I real estate theme, I need a child category for Community category so I just set the Hierarchical to True. But when I tried displaying it in my page the Community comes first before the sub community. This is what it displays: "Business Bay, Business Tower, Dubai, UAE" instead of "Business Tower, Business Bay, Dubai, UAE", Business towers is the child, Business bay is the parent. It should be child first before the parent right? can you please help me. here is the screeshot when i display the community Here is the code:

    $communitylabels = array(
            'name' => __( 'Community', 'contempo' ),
            'singular_name' => __( 'Community', 'contempo' ),
            'search_items' =>  __( 'Search Communities', 'contempo' ),
            'popular_items' => __( 'Popular Communities', 'contempo' ),
            'all_items' => __( 'All Communities', 'contempo' ),
            'parent_item' => __( 'Parent', 'contempo' ),
            'parent_item_colon' => __( 'Parent', 'contempo' ),
            'edit_item' => __( 'Edit Community', 'contempo' ),
            'update_item' => __( 'Update Community', 'contempo' ),
            'add_new_item' => __( 'Add New Community', 'contempo' ),
            'new_item_name' => __( 'New Community', 'contempo' ),
            'separate_items_with_commas' => __( 'Separate Communities with commas', 'contempo' ),
            'add_or_remove_items' => __( 'Add or remove Communities', 'contempo' ),
            'choose_from_most_used' => __( 'Choose from the most used Communities', 'contempo' )
        );
        register_taxonomy( 'community', 'listings', array(
            'hierarchical' => true,
            'labels' => $communitylabels,
            'show_ui' => true,
            'query_var' => true,
            'rewrite' => array( 'slug' => 'community' ),
        ));
    }

    if ( ! function_exists( 'community' ) ) {
        function community() {
            global $post;
            global $wp_query;
            $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'community', '', ', ', '' ) );
            echo esc_html($terms_as_text);
        }
    }

Here is the code when i call the custom taxonomy:

      // Title
        case 'listing_title' :

           echo '<h2 class="marT5 marB0">';
                ct_listing_title();
            echo '</h2>';
            
        break;

        // location
        case 'listing_city_state_zip' :

            echo '<p class="location marB0">';  
            community();
            echo ', ';     
                city();
                echo '';
                country();
               
            echo '</p>';
Source Link
Loading