WordPress.org

Ready to get started?Download WordPress

Forums

laying out a template page (7 posts)

  1. FriendsCottage
    Member
    Posted 3 years ago #

    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?

  2. ThorHammer
    Member
    Posted 3 years ago #

    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.

  3. FriendsCottage
    Member
    Posted 3 years ago #

    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.

  4. Digital Raindrops
    Member
    Posted 3 years ago #

    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

  5. FriendsCottage
    Member
    Posted 3 years ago #

    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!!

  6. ThorHammer
    Member
    Posted 3 years ago #

    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.

  7. FriendsCottage
    Member
    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic