• Resolved cechols

    (@cechols)


    Currently, I format each of my posts with a uniformly-sized image at the top that is unique to that post.

    The result is that my post title, timestamp and then image sequence consumes quite a bit of space. For example:

    Current post style

    What I want to do, and what I can’t seem to find a plugin or HTML script for is to combine the post title, timestamp and image. Like this:

    Desired post style

    Combining these elements might not even be possible. I don’t know, and I’m no plugin coder. If anyone is aware of a way to do what I’ve described here (or is interested in dev-ing a plugin for it), I would really appreciate the help.

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • use the image(s) as the background for all of that stuff..

    there are numerous examples of how to use php to display a certain header image depending on the category being displayed. The same “theory” applies to what you are trying to do, the code will be slightly different obviously..

    Once you have the proper image its just a matter of setting the image as the background for all of the meta data.

    you dont need a plugin for any of that.

    strike all of that above ..

    after looking at your site ..

    about the only thing i see you having an option of doing is using the post_id as the image name, and then using some tricky php and and CSS to make the image the background.

    The downside to that is that you wont have the post_id handy when youre writing the post.

    hmmm … ill have to think about that a little bit.

    you could potentially use the post slug as the name.

    Thread Starter cechols

    (@cechols)

    whooami:

    Thanks for the quick response. I assumed there would be a method to using PHP for what I want – but because my PHP coding skills are minimal, I could use some direction on how to do it.

    If you could point me to a thread here or some other further explanation of the process, it’d be helpful. Just telling me that it <i>can</i> be done doesn’t help much.

    Thanks!

    im thinking.. patience grasshopper

    If the images are uploaded (and so ‘attached’ to a post) through WordPress’ post editor uploading utility:

    http://guff.szub.net/2006/02/09/post-image/

    The use of the plugin could be combined with your div (or whatever) outputting an inline style:

    <div class="postheader" style="background-image:url(<?php szub_post_image('img_tag=0'); ?>);">
    <h2><?php the_title(); ?></h2>

    Whatever else goes in the div~
    </div>

    I’m not a fan of inline styles, but for this it could make sense.

    see if this doesnt help you:

    http://guff.szub.net/2006/02/09/post-image/

    Im not sure if thats going to do exactly what you want though. Perhaps kaf will wander in, see this, and shed some light.

    edit: hah! there he is!! here i was going through some past posts with this edit window open while he was typing .. aint that somethin’

    Thread Starter cechols

    (@cechols)

    Thanks to both of you for the replies. I apologize for not responding to your posts sooner – I was out of the house most of the day.

    Kaf, I actually tried the ‘post image’ plugin from your page earlier today, but couldn’t get the effect I wanted. I didn’t combine it with the div for an inline style output, though.

    First thing in the morning I’ll try this out and let you know if it works.

    I really appreciate the help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Combining Post Title, Timestamp and Header Image?’ is closed to new replies.