Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter titofix

    (@helmrict)

    Michael, Chito, you guys are awesome – thanks for the quick reply!

    I can’t tell from the video if you are experiencing the same issue but I’ll try and be a little clearer than “not working”!

    Specifically, there is a page “Who We Are” but I can no longer click on that menu item (in firefox only) to get to that page. I can click on the children of that menu item. Similarly, under “What we Do”, I can’t click on that menu item to get to that page but I can get to the ones under it.. Except under “What we do” there is a menu item “Our Programs”. I can’t click on the our programs page but I can click on the children of that page.

    I hope that makes more sense.

    And yes, I’ve also tried in incognito mode in firefox.
    Thank you

    Thread Starter titofix

    (@helmrict)

    Thank you for the thorough analysis of my code, very kind of you! I will work with it to see if I can incorporate your suggestions and still get the results I’m after. A great learning opportunity for me, thanks again.

    Thread Starter titofix

    (@helmrict)

    Thanks @bcworkz, I marked it as resolved because after working on this for a while, I cobbled some code together to get results… It seems to work but is not efficient and contains some excess calls. Would love some guidance on improvemwnt Here is what I’ve done…
    $venueloc= tribe_get_venue_id();

    <?php   // shouldn't need down to next comment
    $terms = get_the_terms( $venueloc, 'neighborhood' );
    // Loop over each item since it's an array
    if ( $terms != null ){
    foreach( $terms as $term ) {
    $term_link = get_term_link( $term, 'neighborhood' );
     } } ?>
     
    <!--- Here ---->
     <?php $parentsneighborhood ="";
    foreach((get_the_category($garbage)) as $category) {
    if ($category->category_parent == 0) {
    $parentsneighborhood .= ' <a href="' . get_category_link($category->cat_ID) . '" title="' . $category->name . '">' . $category->name . '</a>, ';
    }
    }
    echo substr($parentsneighborhood,0,-2); 
    
    // get all product cats for the current post
    $categories = get_the_terms( $venueloc, 'neighborhood' ); 
    
    // wrapper to hide any errors from top level categories or products without category
    if ( $categories && ! is_wp_error( $category ) ) : 
    
        // loop through each cat
        foreach($categories as $category) :
          // get the children (if any) of the current cat
    	  $children = get_categories( array ('taxonomy' => 'neighborhood', 'parent' => $category->term_id ));
    	  $term_link = get_term_link( $term );
    
          if ( count($children) == 0 ) {
              // if no children, then echo the category name.
    		  echo '<a href="' . esc_url( $term_link ) . '">' . ", ". $term->name . '</a>';
          }
        endforeach;
    endif;
    ?>

    My taxonomy contains parent, child, grandchild. This code is providing the desired output of:
    -PARENT (if no child or grandchild)
    -PARENT, CHILD (if no grandchild)
    -PARENT, GRANDCHILD (if all three are associated)

    Thread Starter titofix

    (@helmrict)

    Closing, did not resolve, I just used a different application for the reservations and seems to be working.

    Thread Starter titofix

    (@helmrict)

    Could not figure out a combination that makes the dropdowns work!

    Thread Starter titofix

    (@helmrict)

    Thanks sterndata for the suggestion, I’ll dig around too and try to find the right element.

Viewing 6 replies - 1 through 6 (of 6 total)