PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

ul li in post body?

  1. I want the data in every post in my website be displayed beside each other. So I did make the ul li inline of every post.
    When a user submits a post it has to use the <css>li </css> to make sure everything will be in the right place.

    Now I want to make it easier for them by letting the user submit the data with a form.
    Is it possible if I make a form (by using the Post Body) so a user submits data for a post that the submitted data will be in a 'ul li'?

    I hope that I explained what I want clearly :-)

    Posted 14 years ago on Wednesday March 3, 2010 | Permalink
  2. Couldn't you just wrap the content output of the WordPress loop code that displays the posts in the li rather than actually including the li in your post content? That way each time a post is output it is wrapped in an li tag?

    Posted 14 years ago on Wednesday March 3, 2010 | Permalink
  3. @Carl, It's on this website what I'm talking about: http://proefcollege.info
    I want each item of the content in a li-tag so the items will be styled beside each other.

    I want to make the user of the website easy by letting post the data into the website with a form and not going into the back-end of WordPress.

    Posted 14 years ago on Wednesday March 17, 2010 | Permalink
  4. Yes, I understand what you are trying to do. But why don't you include the LI as wrappers in your loop rather than in the posts themselves?

    By including them in the actual post body you are limiting what you can do with those posts in the future if you change the layout.

    You should be including them as part of the loop that outputs the posts, so that each post is wrapped in the LI rather than those tags being in the post content itself.

    so for example... and this isn't acutal PHP code but i'm just illustrating how you should be doing it:

    [wordpress loop]
    <li>
    [post output]
    </li>
    <li>
    [end wordpress loop]

    Doing it this way keeps your post data clean and leaves the markup where it belongs.

    Posted 14 years ago on Wednesday March 17, 2010 | Permalink
  5. @Carl,

    but what I get is that al the information in the_content wil be in one <li>
    and I want each sentence of the post beside each other and I do that by using display: inline in my stylesheet.

    If someone is giving tha data for a post into the form. It gets below each other and I want it styled beside each other.
    See http://proefcollege.info, the last post is done by a gravity form

    Posted 14 years ago on Sunday March 21, 2010 | Permalink
  6. I did it differently. I did style the <p> so now the input with the form will be beside each other.

    Thanks Carl for helping!

    Posted 14 years ago on Sunday March 21, 2010 | Permalink