WordPress.org

Ready to get started?Download WordPress

Forums

Split posts into pages and sections (1 post)

  1. martin.aleksander
    Member
    Posted 3 years ago #

    Hey guys!

    I am using Magic Field to create a group witch I am duplicating.
    This is working just fine!

    Now, I want to have each section/group content in a new page - so that the whole posts gets paginated.

    I have the following code in my template-file.
    The first one just prints out all the section titles, while the other one outputs all the sections. This could be from 1-10 sections.

    How would I go about making each section in a new page?

    <div id="artikkelserie">
    	<h4>Print alle seksjonstitler</h4>
    	<?php $listSectiontitles = get_group('Seksjoner'); ?>
    		<ul>
    		<?php foreach ($listSectiontitles as $seksjonstitler) {
    			echo "<li>" . $seksjonstitler['sectiontitle'][1] . "</li>";
    		} ?>
    		</ul>
    </div>
    <?php $omtaleseksjoner = get_group('Seksjoner');
      foreach($omtaleseksjoner as $seksjoner){ ?>
      <div class=""><h3><?php echo $seksjoner['sectiontitle'][1]; ?></h3></div>
      <div class=""><?php echo $seksjoner['sectioncontent'][1]; ?></div>
    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by martin.aleksander
  • This topic is not resolved
  • WordPress version: 3.0.1