Support » Plugins » Modifying the loop

  • Hi,

    I would like to have control of the output i get from the loop. Instead of giving me title, by, category, text, date and image – i only need the title (or preferable the excerpt text) and the image.

    So the solution i am looking for is 3 images with title/excerpt (from the post) horisontally across the frontpage.

    I don’t care if it is a plugin, widget or hardcoded in WP. Just need to change the output of the loop.

    Can anyone help with this?


Viewing 5 replies - 1 through 5 (of 5 total)
  • You can edit the Loop to display anything you want. The Default them is there an en example of hat tags are available to you. But in any theme, you can edit what output is displayed.

    To display images, however, you’re looking for smething more customized. You cannot generally (well, you *could*, but it would require some extra work on the server’s part) just place an image within the post content and strip everything away to display the image. What usually used is either a plugin or a custom query and meta data.

    I can’t tell you what plugin to use – since I generally just write my own code for this type of thing. But I’m sure there are several out there. Personally, I use custom fields and the get_post_meta() function to pull the images into the Loop and display the title and image (which link to the post and full content). if I want to limit how many posts are displayed (and/or in a particular category), I’ll use query_posts for that.

    Hope that helps!


    Thanks for your answer.

    I would like to make it without custom fields, since i have a custoumer who will use it afterwards, and I want to make it as easy as possible.

    If you look at my site: you can see that I have pulled <?php the_content(‘Read the rest of this entry »’); ?> giving me the image from the post and the title. It also gives me the text (or content) from the post. I would like to filter the text away.

    Do you know how to do this? Hardcoded solutions are welcome also :o)


    Actually, using a custom field *is* the easiest solution. Makes it *really* simple. Filtering the text away will just slow things down – it’s made a lot easier using custom fields, and this is *exactly* what custom fields are used for. If you don’t like the idea of them using the default “look and feel” of custom fields, then you can create custom boxes that look like they’re part of the installation. This tutorial is *excellent* for this type of thing. (It’s now become a part of my standard functions.php file when I do sites for clients – it’s so easy to use and so customizable it’s not even funny.)

    the only difference between putting the image in the content and using a custom field is, when the client puts in “insert into post”, they copy the line in the “file URL” thing, and paste it into the custom field you provide for them. That’s it. Your code handles the rest.

    Hi Doodlebee,

    Okay, i gave in to you soution. Thanks for making it clear to me. I even found this miraculous plugin that very easiely makes custom fields and also support the browse image function. So now I got the best solution with best client usability.

    Thank you very much for helping me on the way.

    The plugin is: flutter

    yay! Glad you got it going 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Modifying the loop’ is closed to new replies.