• [ Moderator note: please wrap code in backticks or use the code button. Don’t use single quotes. ]

    '	$mypages = get_pages( array( 'child_of' => $post->ID, 'sort_column' => 'post_date', 'sort_order' => 'desc' ) );
    
    	foreach( $mypages as $page ) {
    		$content = $page->post_content;
    		if ( ! $content ) // Check for empty page
    			continue;
    
    		$content = apply_filters( 'the_content', $content );
    	?>
        <?php if ( get_post_meta( get_the_ID(), 'Description', true ) )  ?>
    
    		<h2><a href="<?php echo get_page_link( $page->ID ); ?>"><?php echo $page->post_title; ?></a></h2>
    		<div class="entry"><?php echo $content; ?></div>
     '

    how to add description to each of this pages from wp_nav_menu link description field

  • The topic ‘get menu_nav description’ is closed to new replies.