WordPress.org

Ready to get started?Download WordPress

Forums

How to show specified images for each post? (4 posts)

  1. Tunghsiao Liu
    Member
    Posted 7 years ago #

    i want a function that can show specified images for every posts. for example, there are 6 posts and their Post slugs are:

    sunflower
    sketch-001
    sketch-002
    sketch-003
    oil-painting
    impression

    i want to show a image list in my index like this:


    <img src="http://localhost/lib/sunflower.jpg" />


    <img src="http://localhost/lib/sketch-001.jpg" />


    <img src="http://localhost/lib/sketch-002.jpg" />


    <img src="http://localhost/lib/sketch-003.jpg" />


    <img src="http://localhost/lib/oil-painting.jpg" />


    <img src="http://localhost/lib/impression.jpg" />

    the problem is, how can i get the image names? is there any function that can carry out? Thanks!

  2. Chris_K
    Member
    Posted 7 years ago #

  3. Tunghsiao Liu
    Member
    Posted 7 years ago #

    maybe not, the images are not uploaded by WordPress

    so, in other words, i just want to know is there anyway to get the postslug just like getPostSlug()?

  4. Tunghsiao Liu
    Member
    Posted 7 years ago #

    ok, i made it from searching:

    http://wordpress.org/support/topic/32894

    sorry for my carelessness :(, Thanks all the same.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.