Support » Fixing WordPress » Sprite menu in WordPress?

  • I’m converting HTML website into wordpress, can’t find how to use sprite in wordpress. Is there any way to make it, I tried lavalamp jQery, but it doesn’t work very well. I’m using wp_list_pages for the menu.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Sprite is a CSS technique relating to background image positioning. It works the same in WordPress as anywhere else.

    Thanks for the reply, but if I use wp_list_pages, I don’t have li id=’page1″ I just have a function. Can you give me an example (very simple) how to do that in WP. Thank you.


    wp_list_pages assigns a unique class to every page in the list:

       <li class="page_item page-item-2"><a href="/about/">About</a>
       <li class="page_item page-item-29"><a href="/contact/">Contact</a>
       <li class="page_item page-item-31"><a href="/gallery/">Gallery</a></li>

    you have the hooks you need to assign CSS sprites, using class of page-item-2, page-item-29, page-item-31. The number after page-item is the page’s postID#, which never changes.

    In terms of “I don’t have li id=’page1″ I just have a function.”, that function outputs code which the browser displays. Use ViewSource or Firebug to see the output, to learn the classnames for your particular site. Then you can create the CSS from those class names. It sounds like you already know how to do that.

    If you prefer class names like ‘about’ and ‘contact’, this plugin lets you assign a custom class to any page. Then wp_list_pages will include that class name in its output.

    If anything is still not clear ask further.

    THANK YOU!!!! It looks like I found what I’ve been looking for.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sprite menu in WordPress?’ is closed to new replies.