Custom post menu

Loops thru Custom post category and get the post name and link.
You need to crate a Advanced custom group category, in this case i named it ”Lang”


<?php
function consult_hacks_tax(){
    $args = array(
            'labels' => array(
                'name' => 'Langs',
                'singular_name' => 'Lang',
            ),
                'public' => true,
                'hierarchical' => false,
                'query_var'    => true,
                'show_in_nav_menus' => true,
                'show_admin_column' => true,  
            );

    register_taxonomy('langs', array('hacks'), $args);
}
add_action('init', 'consult_hacks_tax', 0);


?>

<?php
global $wpdb;
$r = $wpdb->get_results( "SELECT * FROM  `wp_term_taxonomy` 
                                   INNER JOIN `wp_terms` 
                                   ON wp_term_taxonomy.term_id = wp_terms.term_id  
                                   WHERE `taxonomy`='langs'", OBJECT );
foreach($r as $row){
echo '<li id="row'.$row->term_taxonomy_id.'" class="entry-title"><strong>'.$row->name .'</strong><BR>';

$rel = $wpdb->get_results("SELECT * FROM `wp_table` WHERE `term_taxonomy_id`=$row->term_id", OBJECT);
echo '<ul class="ul-class">';
$z = 0;
foreach($rel as $re){

$pos = $wpdb->get_results("SELECT * FROM `wp_posts` WHERE `ID`=$re->object_id", OBJECT);

foreach($pos as $p){

    echo '<li class="hacks-link">';
    echo '<a href="/pagetype/'. $p->post_name .'">'.$p->post_title ."</a>";
    echo "</li>";
    $z++;
    }
}
?>