• Resolved flush

    (@flush)


    I’m trying to have a page where posts would display inline, in lines of 3, then drop and start a new line. (its to display images, all of the same size)
    Has anybody seen something like that? I’d like to talk to someone who’s actually done it.
    Thanks

Viewing 15 replies - 1 through 15 (of 26 total)
  • you can float them and clear the float after every third post

    Thread Starter flush

    (@flush)

    Thanks Nebelmond,
    Have you actually seen it working on someone’s blog?

    ive seen it done. more than once, and its not hard to do. Its all CSS.

    You dont need to talk to someone, you need to learn how how to utilize CSS

    Thread Starter flush

    (@flush)

    Do I need to create a style sheet specifically for this page or can I insert the style of this page in the original style.css?

    Flush:

    I am interested in the same thing, and I was about to *ahem* flush out the details. I don’t think it is a matter of only CSS, so I will post back here if I find anything.

    it is most certainly a matter of just CSS. the wordpress loop, for instance, has absolutely nothing to do with display, just content. What you use to display whats inside the loop is controlled by CSS.

    Take a gander at some of the photo sites that use wp — quite a few of them utilize horizontal posts and in fact, Ive seen atleast two that actually scroll horizontally. Thats just CSS.

    doesnt matter whats “in” the loop — content is content, whether its an image or an essay.

    there is a difference between structure and style.

    Thread Starter flush

    (@flush)

    Yes but for example css won’t control the clearing of the floating of the divs after every third post to start a new line. I have to do that in a new php page template I suppose?
    I think that what I’m trying to get is more difficult than just a horizontal scroll.
    Samaritan, Doodlebee has given me some advice in a previous post that might be to you (there are still things I don’t understand because I don’t know css)
    https://www.ads-software.com/support/topic/85451?replies=16#post-438200

    Huh? All you do is set up a clearer class and add it to that particular post element. It’s still just css.

    Thread Starter flush

    (@flush)

    oh… ok… a clearer class.
    Hadn’t thought of that. So I could end every third post with that.
    How do I include the css in my style.css to have it apply to that particular page template only?

    Well, yah…. for stuff like this kind of css specific info, you really need to google css help or something like and try some of the sites returned.

    Thread Starter flush

    (@flush)

    Yes I’m doing that too.
    If I clear the divs by calling a css class at the end of every third post, I don’t need to put anything regarding the clearing in the page template’s php file?

    Flush:

    Yes, I looked at that. I am still not sure that will do exactly what we want. I am looking at this:

    https://rhymedcode.net/1001-wordpression-loops/grouped-by-category/

    But using the same category for each, and adding an offset to the get_posts() call for each subsequest row. In order to display all posts, you would need to continue incrementing a counter, and I am not sure how to do that in php yet.

    It is frustrating that other commentors continually assert that it can be done, and easily, but cannot provide any examples to work with. The one that you link to is basic, but does not acually show how it could be done in WordPress. The part that is not being explained is how to actually output 3 post groups in the template, since the loop handles one. The alternatives that I have seen for controling the number of posts are being used for displaying multiple categories, not for formating a number of posts in the same category.

    Thread Starter flush

    (@flush)

    Wouldn’t another solution be like Vkaryl said to force manually to start a new row by calling a clearer class in the last post of the row? (does that make sense?)
    That would bypass the 3 post problem, wouldn’t it?
    But I thought Doodlebee dealt with this issue in his example by naming post1,2,3 and then clearing the divs in the custom php page template, so that normally every 3 posts, the divs would be cleared and a new row would begin (…in a theoretical Wonderland of course, reality might not be that simple)

    Just for the record: I don’t think anything trying to show more than ONE would work in a Page template. Pages are meant to display only one single “content”.

    How does the class=”post < ? php whatever the post code is here ? > ” > do anything? It might number the post, but how does it actually make the post output a new post? That is the part that seems to be a problem. How do you format three different posts if your loop only outputs one?

    In my case, I am using a category template to display the excerpt image for posts in a given category. The excerpt links to the post.

    Again, I think the problem is in the loop, and the fact that the standard loop only formats one post at a time. This is why I think a modified loop that grabs 3 posts at a time, and uses offsets might work better, although it would add complexity to the code.

    If I am totaly wrong, please provide examples of a standard loop allowing formatting of a specific number of posts (ie. inserting a seperator between posts 5 and 6, or hilighting every 8th post).

    I think we have made it clear that we are trying to do something we are not sure how to do, so telling us that it can be done is just not quite enough. The original post asks for examples of blogs that do this, and so far no one has been able to point to any.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘anyone ever seen a blog where posts displayed inline 3 in a row?’ is closed to new replies.