• I want to create a template page (not blog page) with multiple divs for the main content, eg a left div and a right div.

    How can I put different content into each div? As I understand it, the content that is created in the editor is retrieved by a single tag (the_content), which presumably must be placed inside only one of the divs and not the other. How then do I get content into the other div?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You might create custom loops: retrieve content for specific categories, tags or whatever and display the content based upon each custom loop into separate divs.

    Thread Starter friendscottage

    (@friendscottage)

    Would this still work for pages? As I understand it, page content can’t be associated with categories (not sure about tags)? So, how you retrieve the content of a particular page?

    If you have any example code where this works for pages, I’d appreciate seeing it.

    Hi FriendsCottage,
    Not sure what theme you are using, it would also depend on your skill set, content could be posts, images, video, is it just the content area, or additional sidebar.

    It could be just a matter of laying out the page with a table and content.

    There are many options for template pages abd categories, check out options on codex

    HTH

    David

    Thread Starter friendscottage

    (@friendscottage)

    Thanks. I found that my theme (Magazine Basic) allows you to assign categories to a menu, so that when you select the menu item you get the posts for that category.

    This works, except that the front page layout (that attracted me to the theme) isn’t used. Will have to find a way to control the layout of the posts, and to ensure that the posts are displayed in the order I want. Which is kind of where I started!!

    It is very tricky to change the layout on the front page of Magazine Basic. You should go for a much more basic theme. Then, try to change some of the CSS, play around with the loop and learn gradually.

    I still suggest that you take a look at my suggestion regarding custom loops, this is a not-too complicated way to achieve what you want.

    Thread Starter friendscottage

    (@friendscottage)

    Thanks ThorHammer. But could you clarify how you would identify a particular page’s content to go in a particular div? Does each page content have a post-id?

    Might also consider Adeptris’ idea about using tables. That way the whole page contents can be seen in the editor at once. Seems to me that if you use loops, then there is no way to see how the final page will look until you view it on the website. I’m used to designing static sites in DW where you can see the full page as you design it

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘laying out a template page’ is closed to new replies.