• Resolved geox124

    (@geox124)


    Hi,

    I tried to create posts and pages through wordpress, and I want to attach an image(s) to it.
    I don’t want to add the image through the normal content field, because I that field specially for content text.
    I’ve searched around, there’s a method to put a url on the custom fields section, and do the query from there.
    I’m just wondering if any of you could give me some other suggestions?
    What’s the best way to achive it.

    Thanks,
    Zendy

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,
    For your case the ,”custom fields” method is the best,read this to learn how :display post images via custom fields/

    If you’re adding only one image per post/page then consider using the post thumbnail functionality.

    http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/

    Thread Starter geox124

    (@geox124)

    Thanks crerem.
    For that method, we need to input the image url manually rite?
    Is there anyway to use a browse button to choose the image?

    Thanks Joseph.
    I’ve read that article, and I’ve checked on the post section, but I couldn’t find the post thumbnail box.
    Could you please tell me where to find that box?
    I’ve added the function to functions.php btw.

    A featured image meta box should appear, below post tags on the editor sidebar, once you’ve added add_theme_support( 'post-thumbnails' ); to functions.php.

    Thread Starter geox124

    (@geox124)

    thanks Joseph.
    Oh, it was that featured image, I missed it because I was looking for post thumbnail section.
    Ok, so if I use that feature image, I can use it using the loop straight away or do I need to do special query like using custom fields?
    And this featured image only 1 per past/page rite?

    You’ll need use <?php the_post_thumbnail(); ?> inside the loop to display the image. And yes, it’s one image per page/post.

    Thread Starter geox124

    (@geox124)

    Thanks a lot.
    I’ll give it a try 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Attach image(s) to posts or pages’ is closed to new replies.