Exemplo n.º 1
0
// get all bands
$bands = new_get_all_bands();
?>
<div id="left-bar">
<?php 
// list all songs per band
foreach ($bands as $current_band) {
    ?>
    <h3><?php 
    echo $current_band->post_title;
    ?>
</h3>
    <div>
    <?php 
    $songs = new_get_children_songs($current_band);
    ?>
        <ul>
    <?php 
    foreach ($songs as $current_song) {
        ?>
            <li>
                <a href="<?php 
        echo new_get_first_lesson_permalink($current_song);
        ?>
"><?php 
        echo $current_song->post_title;
        ?>
</a>
            </li>
        </ul>
				<?php 
    if (et_get_option('divi_integration_single_top') != '' && et_get_option('divi_integrate_singletop_enable') == 'on') {
        echo et_get_option('divi_integration_single_top');
    }
    ?>

				<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class('et_pb_post');
    ?>
>
                <?php 
    $debug = false;
    $songs = new_get_children_songs(get_post());
    $genres = get_the_terms(get_the_ID(), 'Style');
    $genres_names = new_get_array_of_properties($genres, 'name');
    $members = get_the_terms(get_the_ID(), 'Member');
    $past_members = get_the_terms(get_the_ID(), 'Past Member');
    $tags = get_the_terms(get_the_ID(), 'post_tag');
    $args = array('posts_per_page' => 3, 'post_type' => 'new_band', 'tax_query' => array(array('taxonomy' => 'Style', 'field' => 'name', 'terms' => $genres_names, 'operator' => 'IN')));
    $related_bands_query = new WP_Query($args);
    $related_bands = $related_bands_query->posts;
    $origin = get_post_meta(get_the_ID(), 'new_band_origin', true);
    $active = get_post_meta(get_the_ID(), 'new_band_active', true);
    $website = get_post_meta(get_the_ID(), 'new_band_website', true);
    //                    $i = 0;
    //                    $lesson = array();
    //                    foreach ($songs as $song) {
    //                        $lessons[$i] = new_get_children_lessons($song);