Title: olerules's Replies | WordPress.org

---

# olerules

  [  ](https://wordpress.org/support/users/olerules/)

 *   [Profile](https://wordpress.org/support/users/olerules/)
 *   [Topics Started](https://wordpress.org/support/users/olerules/topics/)
 *   [Replies Created](https://wordpress.org/support/users/olerules/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/olerules/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/olerules/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/olerules/engagements/)
 *   [Favorites](https://wordpress.org/support/users/olerules/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Need help: List custom field from parent page in menu](https://wordpress.org/support/topic/need-help-list-custom-field-from-parent-page-in-menu/)
 *  Thread Starter [olerules](https://wordpress.org/support/users/olerules/)
 * (@olerules)
 * [16 years ago](https://wordpress.org/support/topic/need-help-list-custom-field-from-parent-page-in-menu/#post-1472612)
 * Btw, this is the code I got by now;
 *     ```
       function end_lvl(&$output, $depth) {
       		$args=array(
       			  'orderby' => 'title',
       			  'order' => 'ASC',
       			  'post_parent' => 0,
       			  'post_type' => 'page',
       			  'post_status' => 'publish',
       			  'posts_per_page' => -1,
       			  'caller_get_posts'=> 1
       			);
       			$my_query = null;
       			$my_query = new WP_Query($args);
       			if( $my_query->have_posts() ) {
       			  while ($my_query->have_posts()) : $my_query->the_post();
       				$link = get_post_meta($my_query->post->ID, 'link_url', true);
       				$text = get_post_meta($my_query->post->ID, 'Menytekst', true);
       			  endwhile;
       			}
       			wp_reset_query();  // Restore global post data stomped by the_post().
   
       		$indent = str_repeat("\t", $depth);
       		$output .= '</div><div class="menu_info">'.$text.'</div>';
       		$output .= "$indent</ul>\n";
       	}
       ```
   
 * And it works somehow, but the output “$text” is the same for every dropdown.

Viewing 1 replies (of 1 total)