Results 1 to 3 of 3
Thread: Call a custom menu into a page.
Jun 20, 2012, 14:49 #1
- Join Date
- Apr 2009
- 0 Post(s)
- 0 Thread(s)
Call a custom menu into a page.
I'm working on this art gallery website,
I created a custom template for my "artists" page, and I want to call a custom menu that I created specifically for this page called "Artists".
This menu will list all the names of the artists in our gallery.
I want the page to look like that:
Every link in the menu will have the featured image of the page as the thumbnail and the pages title as the artists name.
I did that because it seemed to me like a reasonable way to make the addition of artists flexible on that page,
you'll basically only need to create a page then add it as a link in "Artists" menu then it automatically appears on the page, let me know if you think there is a better way to make it.
Now I'm having a problem with calling the right menu, is the code that I found wrong?
<?php /* Template Name: Artists page */ get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $menu = wp_get_nav_menu_object( “artists”); echo $menu->artists; wp_nav_menu(array(“menu”=>”artists”)); ?> <?php endwhile; endif; ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
And also will I be able to style it and make the featured image appear as the thumbnail and the whole menu in 3 column?
This custom menu won't have sub-level pages.
Please help, it would be greatly appreciated, thank you in advance!