The MU forums have moved to WordPress.org

How can I select image and relate it to a post? (4 posts)

  1. spstieng
    Member
    Posted 13 years ago #

    I'm expanding Wordpress to function more like a CMS. This includes relating image to a post.

    Currently I have a text field where I paste an image path. Now I want to click a button which opens a dialog box, then I navigate to the right folder and select a file to "open" (from server side).

    The file path is returned.

    How can I go about accomplishing this?

    I've looked at media.php to see if I can use the part which Wordpress already uses. But I can't figure out which part I should use.

    Any help appreciated.

  2. jameslaws
    Member
    Posted 13 years ago #

    You can do this with Wordpress's built in Post Thumbnail feature. You can read up on how easy it is to implement here: http://wpengineer.com/about-wordpress-post-thumbnail/

    Although you would need to upgrade to the current version of WordPress to keep it easy.

  3. spstieng
    Member
    Posted 13 years ago #

    Yeah, I just discovered this this morning actually.
    This really should have been there as default.

    There are a few things missing though:

    1. You can't see what files is selected
    2. It's placed in the sidebar
    3. How would I go about if I want one small picture in article listing, but another in full article?

  4. andrea_r
    Moderator
    Posted 13 years ago #

    3. How would I go about if I want one small picture in article listing, but another in full article?

    You need a theme that shows the thumbnails on the front page. Less about usage, more about using the proper theme.

About this Topic

  • Started 13 years ago by spstieng
  • Latest reply from andrea_r