title: How to redirect on same page with first post data when click on a custom taxonomy?
body: <p>I have a question related to WordPress. I have made a dropdown of custom taxonomies on single.php page That's the code I am using to list my taxonomies:</p>
  
  <pre><code>       &lt;ul class="dropdown-menu" aria-labelledby="dLabel"&gt;
            &lt;?php $terms = get_terms( array(
                  'taxonomy' =&gt; 'subject',
                  'hide_empty' =&gt; false,
                              ) );
              if( !empty( $terms ) ):
              foreach ($terms as $key =&gt; $value) :
                  $term = $value-&gt;name;
           ?&gt;
           &lt;li&gt;&lt;a href=""&gt;&lt;?php echo $term; ?&gt;&lt;/a&gt;&lt;/li&gt;
           &lt;?php endforeach; endif; wp_reset_query();  ?&gt;
        &lt;/ul&gt;
  </code></pre>
  
  <p>Right now all taxonomy in dropdown have the same post link that is opend on the page. I want that every taxonomy should have the link of it's respective first post and when I click on a taxonomy it open that taxonomy's first post on the same single.php page. Is there any way of doing that? 
  Here is the picture of my page:
  <a href="https://i.stack.imgur.com/Ic9OL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ic9OL.png" alt="enter image description here"></a> </p>
  
  <p>That's how my taxonomy dropdown look like if you zoom and look in the bottom left corner you will see the current post link that is showing on all subject names is there any way that I can change this link to that subject's first post link. Right now biology taxonomy post is open when I click on chemistry first post of chemistry open on this page. Please help me in doing this task I'll be very thankful to you.</p>