How to display custom taxonomies with links in filter menu?

<div id="filtering-nav">
<a href="#" class="filter-btn"><span>Filter</span></a>
<ul>
    <li><a href="#all" class="all">All</a></li>
    <?php $args=array('orderby' => 'name','taxonomy'=>'galleries');
    $galleries=get_categories($args);
    foreach($galleries as $gallery){ ?>
    <li><a href="<?php echo get_category_link( $gallery->term_id ) ; ?>" class="<?php echo $gallery->gallery_nicename; ?>"><?php echo $gallery->name; ?></a></li>
    <?php } ?>
</ul>
<div class="clearfix"></div>

When you pass argument to get_categories function , you need to pass name of taxonomy as taxonomy parameter to retrieve taxonomy instead of categories…

Here is complete reference..

http://codex.wordpress.org/Function_Reference/get_categories

Compare your code to below, you are missing taxonomies in args in register post type and rewrite slug in custom taxonomy arg. Below code is working perfectly.

$custom_slug = get_option('slug') != '' ? get_option('slug') : 'portfolio';

    $args = array(
        'labels'            => array(
            'name'                  => __('Portfolio'),
            'singular_name'         => __('Portfolio Project'),
            'add_new'               => __('Add Project'),
            'add_new_item'          => __('Add Project'),
            'new_item'              => __('Add Project'),
            'view_item'             => __('View Project'),
            'search_items'          => __('Search Portfolio'), 
            'edit_item'             => __('Edit Project'),
            'all_items'             => __('Complete Portfolio'),
            'not_found'             => __('No Projects found'),
            'not_found_in_trash'    => __('No Projects found in Trash')
        ),
        'taxonomies'        => array('portfolio-categories', 'portfolio-clients', 'portfolio-tags'),
        'public'            => true,
        'show_ui'           => true,
        '_builtin'          => false,
        '_edit_link'        => 'post.php?post=%d',
        'capability_type'   => 'post',
        'rewrite'           => array('slug' => __($custom_slug)),
        'hierarchical'      => false,
        'menu_position'     => 20,
        'menu_icon'         => WP_PLUGIN_URL . '/portfolio/images/icon.jpg',
        'supports'          => array('title', 'editor')
    );

    /** create portfolio categories (taxonomy) */
    register_taxonomy('portfolio-categories', 'project', array(
            'hierarchical'      => true,
            'show_ui'           => true,
            'rewrite'           => array('slug' => __($custom_slug . '/category')),
            'labels'            => array(
                    'name'                          => __('Portfolio Categories'),
                    'singular_name'                 => __('Portfolio Category'),
                    'search_items'                  => __('Search Portfolio Categories'),
                    'popular_items'                 => __('Popular Portfolio Categories'),
                    'all_items'                     => __('All Portfolio Categories' ),
                    'parent_item'                   => __('Parent Portfolio Category'),
                    'parent_item_colon'             => __('Parent Portfolio Category'),
                    'edit_item'                     => __('Edit Portfolio Category'), 
                    'update_item'                   => __('Update Portfolio Category'),
                    'add_new_item'                  => __('Add New Portfolio Category'),
                    'new_item_name'                 => __('New Portfolio Category'),
                    'separate_items_with_commas'    => __('Separate Portfolio Categories with commas'),
                    'add_or_remove_items'           => __('Add or remove Portfolio Categories'),
                    'choose_from_most_used'         => __('Choose from the most used Portfolio Categories')
        )
    ));




    /** create new custom post type */
    register_post_type('portfolio', $args);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)