Forums

How to include images you uploaded with an article? (3 posts)

  1. rashrocker77
    Member
    Posted 5 years ago #

    I have a music webzine and post reviews on my website. I upload the coverwork of the album I review with the article. I wish to have a 'latest 5 reviews' feature in my sidebar, showing the 5 latest covers of the albums I have reviewed. I have been looking for a feature like this and Ive used tons of image plugins from wp-plugins.net, but none seem to work like I want them to work. I am desperate and I do not know what else to do, I have always had this feature in CuteNews and its definately a 'must' for my website. Please help me.

  2. Otto
    Tech Ninja
    Posted 5 years ago #

    So, basically, you're uploading images, including them in the posts, and want to make some kind of sidebar which shows those images and presumably the titles of the posts and links to them?

    You could do something tricky with some PHP code, or something with custom fields. There's a few ways I can see to do this.

    The easiest would be to make a secondary custom Loop in that sidebar space, then use regexp to find the first <IMG tag in the post and display only that. I'd have to see examples of your posts to know how to make that work, and it would rely on your posts always having the image in the same place (say, the first image in the post). But it would work okay.

    Or you could use a custom field to explicitly state the location of the image. Then you could make your post loop grab that image and display it, eliminating your need to manually put it into the post in the first place.

    Lots of ways to do it. But it's custom work, I doubt you'll find a pre-made plugin to handle it.

  3. rashrocker77
    Member
    Posted 5 years ago #

    How about, if I put the coverartwork of every album on the first line of every article, and then put 5 excerpts in the sidebar with a limitation of only the first character? Would something like that be possible? Then I would need a latest 5 headlines from x category code and a hack to show images in excerpts. Could someone help me with that?

Topic Closed

This topic has been closed to new replies.

About this Topic