Tag Info

New answers tagged

0

this is not a direct answer to your question but a line of code you would use as reference to work onto. here is a copy of what i use to search thru my table, i search between a data range and then limit it to only display instances of an entered usr_id $this->items = $wpdb->get_results($wpdb->prepare("SELECT * FROM $table_name WHERE `datec` ...


0

Then try to add foreach ( $arr_terms as $terms_links ) { if(!empty($terms_links)) { echo '<a href="#">' . $terms_links . '</a>';  } } That checks if the $terms_links is empty, and if so it wont print it out.


0

I have found other alternatives to do that in the top of the walker i create a variable private megamenu_state; than in my walker if($depth == 0){ $this->megamenu_state = $item->megamenu; } so the variable will get the state of the top level.


0

In a nutshell, assuming you are using a walker to construct your menu. E.g. when customizing the start_el() method, the $item should be an object - somewhat - like the $post object. In reverse that means, you have access to post_parent property. With that information you can retrieve the title with get_the_title() easily. After your edit I see you want ...



Top 50 recent answers are included