Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created February 9, 2015 16:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save billerickson/0177836067dd01cee4fb to your computer and use it in GitHub Desktop.
Save billerickson/0177836067dd01cee4fb to your computer and use it in GitHub Desktop.
<?php
$section = get_post_meta( get_the_ID(), 'be_section', true );
for( $i = 0; $i < $section; $i++ ) {
$subsection = get_post_meta( get_the_ID(), 'be_section_' . $i . '_subsection', true );
for( $j = 0; $j < $subsection; $j++ ) {
$text = get_post_meta( get_the_ID(), 'be_section_' . $i . '_subsection_' . $j . '_text', true );
echo '<p>' . $text . '</p>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment