WordPress.org

Ready to get started?Download WordPress

Forums

Category Template to display things in a table (5 posts)

  1. kapa0
    Member
    Posted 5 years ago #

    Hello.

    I'd like to have a template for a certain category to display content in a two-column table or table-like layout. In one column, there will be the text of each post. In the second column, there will be a video associated with each post, which I imagine will be specified in a Custom Field or somewhere in the post itself.

    I'm pretty sure there's a way, but I don't know what it is. :p Any ideas?

  2. kapa0
    Member
    Posted 5 years ago #

    There's a great post on videos and custom fields here: http://www.sympozium.gr/2008/10/16/wordpress-custom-fields/ .

    Can anyone help me with the layout part?

  3. moshu
    Member
    Posted 5 years ago #

    You don't really need tables for that. At least I don't "design" anything in tables, since they were invented not for layout.

    You can simply apply two divs in the content area of your template: give them a class, define their width (in the stylesheet). Of course, according to your theme's layout.
    Use the_content template tag in the left one and the custom key in the right one.

    Shouldn't that work?

  4. kapa0
    Member
    Posted 5 years ago #

    Makes sense, thanks.

    What if I want multiple rows of content plus video divs? How would the code look?

  5. kapa0
    Member
    Posted 5 years ago #

    I'm not asking for how to do divs, btw. Just for help with the template tags. :)

Topic Closed

This topic has been closed to new replies.

About this Topic