WordPress.org

Ready to get started?Download WordPress

Forums

How to insert a column (part of theme) in the middle of the content body? (1 post)

  1. raycrp
    Member
    Posted 3 years ago #

    I'm not necessarily looking for the how-to or coding help (though if you have any tips from experience, feel free! :) ), but rather help figuring out the logistics of a particular layout.

    As you know, the "content" part of a WordPress posts all appears together. What I'm trying to recreate is how on several news sites, they'll have the title (and the rest of the "meta" stuff), followed by a photo or video, but then the body text is slightly indented either from the get-go (or shortly thereafter) to make room for a thin, left column that might display related stories, advertisements, additional meta data about the post itself, or even contain videos for the post itself.

    Examples:
    http://www.cnn.com/2011/US/05/24/nasa.new.spacecraft/index.html?hpt=T1
    - story highlights, related topics
    http://ds.ign.com/articles/117/1170537p1.html
    - byline, "follow" link, related images, related videos
    http://www.chicagotribune.com/news/local/breaking/chibrknews-blagojevich-to-take-the-stand-20110524,0,6202649.story
    - related articles, related topics, ads

    I want such a column to appear automatically if there is content to fill it (such as related images, videos, etc.), but can be set to either not appear when there's no content for it, or manually turned off if by choice. My dilemma is that since the photo or video that starts each post is part of the "content," I can't indent the text and put in the column unless I were to do that manually for each post. I also want the body text to "wrap" around the column once there's no more column content.

    I've contemplated making a custom field for the image or video input to essentially "separate" it from the body text, but that might prove difficult, since I don't know how it would differentiate between an image URL and a YouTube URL or embed code.

    Anyone have any better ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic