Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2011
    Thanked 0 Times in 0 Posts

    Wordpress, editing page content in sections


    I am building a site for my company. I would like to use wordpress to "force myself" to learn even more about the possibillities it offers.

    My layout is based on boxes that have 30px margin on every side. Some boxes contain text, some contain images, some contains forms. The problem i am having is that i cannot divide a wordpress page into editable boxes. If i for example create the page "Services" and i want to be able to write some text in 7 different boxes vertically, with aligning boxes with images horizontally to every text box, i am not able to do it. The only option i have is to write a bunch of text in the one content feild i am provided with on a wordpress page.

    Here is what i want it to look like:


    What would be the best way to go about this to have an effective wordpress installation?

    thanks in advance, Anders

  2. AdSlot6
  3. #2
    Master Coder
    Join Date
    Jun 2003
    Cottage Grove, Minnesota
    Thanked 1,111 Times in 1,102 Posts
    Create a "New Page" for each of those 7 boxes.
    Type in each one and publish the pages, each with
    their own titles and content.

    When you are in admin click on view all pages and scroll
    your mouse over the titles. Look at the status bar on the
    bottom of your browser to see the URL ... post.php?post=123&action=edit

    Write down the post number for each of the 7 pages.

    Now, go into the admin part "Appearance, editor" and open the theme
    file called "main index template" or whatever your theme calls it.

    You can specify on your index template exactly which page to display for
    each <div> section ... or each of those 7 boxes.

    This is an example, but of course it's not your theme, so yours won't look the same.
    I'm showing this to let you see how you can specify the page "post number", that
    you wrote down earlier.

    In my example, I'm only displaying page 44 in my "feature" box ...

    PHP Code:

     <div class="feature">
            <?php $recent = new WP_Query("page_id=44"); while($recent->have_posts()) : $recent->the_post();?>
            <div class="feat">
    <?php the_title(); ?>
              <?php the_content(); ?>
             <div class="clr"></div>
    <?php endwhile; ?>

    Last edited by mlseim; 03-18-2012 at 10:56 PM.

  4. #3
    New Coder
    Join Date
    Oct 2011
    Thanked 0 Times in 0 Posts
    Thanks for answering. The solution you are presenting is working :-)

    Although i would like some help to make it even better. i want all the box-pairs (text box to the left, image box to the right) to be displayed based on its category. I am going to use this solution for a portofolio with webdesign, graphic design, movies and photos. So i would like the visitor to be able to sort what appears on the portofolio site with some categories at the top.

    Could i make a new page (or preferably a new post) per box-pair, set its category to "wedding photo", insert a feature image wich will be the image in the right box and then include all the boxes that matches the criteria the visitor chooses at the top.

    I have tried several soultions i have gotten by browsing the WP Codex and the forums there, but none seem to work.

    Any ideas?


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts