Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hungrygeneration

    (@hungrygeneration)

    Ok I’ll give it a try! That makes more sense that it is a whole other page. So will it be like an archive page? What page template would you suggest starting with to customize and insert this query?

    Thread Starter hungrygeneration

    (@hungrygeneration)

    Awe ok! I guess I assumed it was a standard function since it was in a stock theme but it must be theme specific in TwentySeventeen.
    Oh I’m still a newbie on the forums. I’ll make sure and do that from now one so it doesn’t mess up the code!
    Right now I am putting the code directly in the content.php file in my theme for posts. There is probably a better way to do this? If so let me know?
    No big deal on transitioning to meta data. I haven’t gotten too far along on putting songs in for that reason.
    Here is what I have so far encompassing the whole header. I tried inputting the code you shared as well as incorporating “$query_vars” in the link:
    However, it is crashing so I know I’ve done something wrong! ??

    		<?php //Tempo Link
    	 		$query->set('tax_query', array(
    			array(
    			  	 'taxonomy' => 'time_signature',
    		   		 'field'    => 'slug',
    				 'terms'    => $query->get('time'),
    				),
    			));
    		$query->set('meta_query', array(
    			array(
    				'key'     => 'tempo',
    				'value'   => array( $query->get('80'), $query->get('120')),
    				'type'    => 'numeric',
    				'compare' => 'BETWEEN',
    				),
    			));
    		//Get Meta Data for Tempos
    		global $post;
    					$meta = get_post_meta($post->ID,'tempo-tempo_1', true); // Use myinfo-box1, myinfo-box2, myinfo-box3 for respective fields
    					if($meta != '') {
    					echo '<span><img src="/wp-content/themes/worshipbook/assets/images/metronome.svg" width="15" height="18"></span>' . '<span style="margin-left:30px"><a href=" ' . $query_vars . ' ">' . $meta . '</a></span>';
    					}else { ; 
    					} 
    					echo '</span>';
    		//Get Time Signatures			
    	     $terms = get_the_terms( $post->ID , 'time_signature' ); 
                        foreach ( $terms as $term ) {
                            $term_link = get_term_link( $term, 'time_signature' );
                            if( is_wp_error( $term_link ) )
                            continue;
                        echo '<span class="enty-tempo-timesignature">';
                        echo '<span><img src="/wp-content/themes/worshipbook/assets/images/G-clef.svg" width="10" height="18"></span>' . '<span style="margin-left:30px"><a href="' . $term_link . '">' . $term->name . '</a></span>';
                        echo '</span>';
                        } 
    
                echo '</span>';
                echo '</div>';
    	?>
    Thread Starter hungrygeneration

    (@hungrygeneration)

    Here’s what I have for displaying them on the page so far since they are custom taxonomies I can’t use the get_tags_list I assume.

    <?php $terms = get_the_terms( $post->ID , ‘tempo’ );
    foreach ( $terms as $term ) {
    $term_link = get_term_link( $term, ‘tempo’ );
    if( is_wp_error( $term_link ) )
    continue;
    echo ‘<span class=”tags-links”>’ . ‘‘ . $term->name . ‘‘ . ‘</span>’;
    }
    ?>
    <?php $terms = get_the_terms( $post->ID , ‘time_signature’ );
    foreach ( $terms as $term ) {
    $term_link = get_term_link( $term, ‘time_signature’ );
    if( is_wp_error( $term_link ) )
    continue;
    echo ‘ ‘ .'<span class=”tags-links”>’ . ‘‘ . $term->name . ‘‘ . ‘</span>’;
    }
    ?>

    How can I modify the link to do that range and require the same time_signature term as well?

    Thread Starter hungrygeneration

    (@hungrygeneration)

    All of the songs I am using (except for one and I’ll figure out a way to deal with that) have a single tempo. But what I want to be able to do is look up songs with a similar tempo by clicking on a link on the top of the song. That was when I am playing and I want to play a similar song it is within easy grasp.
    So where would I define that query? Is that in functions.php?

    Thread Starter hungrygeneration

    (@hungrygeneration)

    Yes, I finally figured out that my theme was what was causing it with the responsive feature. I want to keep that if possible. How could I suppress it with CSS?

    Thanks so much! Love the plugin!

Viewing 5 replies - 1 through 5 (of 5 total)