WordPress.org

Ready to get started?Download WordPress

Forums

Image instead of text in menu (12 posts)

  1. guzh
    Member
    Posted 6 years ago #

    I've seen it somewhere before, but I can't find it again.. I've looked for hours now..

    I know it's possible, but how can you call pages and categories with images instead of text..?
    So if a page/subpage or category/subcatogory is called "info" instead of text saying "info" use display called "img/info.jpg"

  2. guzh
    Member
    Posted 6 years ago #

    doesn't anyone know?

  3. markdw
    Member
    Posted 6 years ago #

    You can do it with posts and pages using a custom field which is entered underneath the post when it is written.

  4. guzh
    Member
    Posted 6 years ago #

    but it has nothing to do with each page..?

    I've seen a code that uses wp_list_pages or wp_list_cats that do this, but I don't find it anywhere..

  5. markdw
    Member
    Posted 6 years ago #

    Below each page or post there is a custom field section. You can add a name for a custom field and then in the location box put the location url of the image you want to pull.

    Then instead of calling the page title etc. call that custom field instead and it will show the image not the page name/title.

  6. guzh
    Member
    Posted 6 years ago #

    what do I write to call a custom field called "button", with links to the pages?

    and is it possible to do that with category-names also?

  7. robertstennett
    Member
    Posted 6 years ago #

    Do not replace you text links with an image.
    The search engines will not spider the links. Just remember the search engine spyder can not see an image or read what the image says, they can only read text so they will not know that this is a link.

  8. guzh
    Member
    Posted 6 years ago #

    robertstennett: I know that.. I want to know a way to display the images and "hide" the text, but not for search engines
    (and anyway, I can always use meta-data to help the search engines).

    If it is a better solution, I would like to add IDs to each page-list-item/cat-list-item ;O

  9. bradstinyworld
    Member
    Posted 6 years ago #

    Doing this is bad theme design in my opinion, in the end it can easily meant he difference between pr1 and pr4.

    You have a couple of options if you really want to do it:

    1) make the text the same color as the button
    2) make the text so tiny no one will see it
    3) Hand code every link and image you want to do it for

  10. guzh
    Member
    Posted 6 years ago #

    Isn't it possible to add a display:none to the text-links, I guess they'll display in the code and the search engines anyway. css-zengarden is a great example..

    So if I could wrap the text-links inside a specified class and every list-items in an unique id it would be exactly what i want (:

  11. guzh
    Member
    Posted 6 years ago #

    does anyone know how i can do that?

  12. llamaman
    Member
    Posted 5 years ago #

    I use the "display:none" css property on the sidebar h2 titles, then add an <img src="file.gif"> above the "wp_get_pages()" code in the sidebar.php file.

    Of course, this assumes that you aren't using widgets...that's a whole 'nother monster! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags