• Resolved kobewolfe

    (@kobewolfe)


    Hi,

    I’m trying to customize a homepage (localhost) by re-arranging the post title, to be after an attached image.

    eg.
    —————————-
    IMAGE
    —————————-
    TITLE
    —————————-
    POST (text)
    —————————-

    So far, i’ve tried to use some inbuilt wordpress methods to re-arrange the content (excuse me, if i’m a complete hack) –

    the_content (
      the_time('M j, Y') .
      the_category('Posted in', '', ' | ') .
      edit_post_link('Edit', '', ' | ') .
      comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?') .
      the_title('<h2>" title="<?php the_title(); ?>">', '</h2>', true)
    
    )

    if i could display the post text just below title that’d be great… but so far not working… any ideas? I’ve explored the /includes post-template.php and found the_attachment_link() method. might that be the right one to use?
    my attempts with using custom fields have failed so far.

    thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m not sure you can use the the_content tag that way. I think it should be like this:

    the_time('M j, Y') .
    the_category('Posted in', '', ' | ') .
    edit_post_link('Edit', '', ' | ') .
    comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?') .
    the_title('<h2>" title="<?php the_title(); ?>">', '</h2>', true) .
    the_content();

    As for attaching images, I usually use plugins.

    Thread Starter kobewolfe

    (@kobewolfe)

    hi thanks for your reply.
    well i’ve managed to get the content displayed using my approach above.. but it’s just placing the attachment precisely where i want it – without using plugins (if possible). if i use the method: the_attachment_link(15, false, false, false)
    the image with an ID of 15 is appended to it’s name appears on the page i.e. attachment_15.
    i’m new to wordpress – so is there a plug-in you’d suggest, to do something that’s (relatively) simple, like this?

    Thread Starter kobewolfe

    (@kobewolfe)

    Can anyone help me with this? I’d like an image attachment to appear ABOVE the post. Surely there’s a wizard out there that can point me in the right direction. Custom fields perhaps?

    ps. I’ve tried forcing the layout with relative css positioning. results were quite buggy.

    Thread Starter kobewolfe

    (@kobewolfe)

    I’m closing this thread, re-writing and re-posting under a new title. I don’t think it’s helping my cause.

    kobewolfe

    how did this work out? I’m looking for the same answer. I wonder if bindanaku can explain a bit more by what he means by “As for attaching images, I usually use plugins.”

    Terry

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Customizing the_title(): below an image, before post content’ is closed to new replies.