title: Next / Previous Post Links from Same Category
body: <p>I am dealing with a very strange code for next/previous links in WP, I cannot seem to make it work ONLY in the same category.</p>
  
  <p>I tried previous answers here, to no use.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;?php
    the_post_navigation( array(
  'next_text' =&gt; '&lt;span class="meta-nav" aria-hidden="true"&gt;&lt;span class="pagination__text"&gt;' . esc_html__( 'Next', 'nubia' ) . '&lt;/span&gt;&lt;span class="pagination__icon" data-icon="ei-chevron-right" data-size="s"&gt;&lt;/span&gt;&lt;/span&gt; ' .
  '&lt;span class="screen-reader-text"&gt;' . esc_html__( 'Next post:', 'nubia' ) . '&lt;/span&gt;' .
  '&lt;span class="post-title"&gt;%title&lt;/span&gt;',
  'prev_text' =&gt; '&lt;span class="meta-nav" aria-hidden="true"&gt;&lt;span class="pagination__icon" data-icon="ei-chevron-left" data-size="s"&gt;&lt;/span&gt;&lt;span class="pagination__text"&gt;' . esc_html__( 'Previous', 'nubia' ) . '&lt;/span&gt;&lt;/span&gt;' .
  '&lt;span class="screen-reader-text"&gt;' . esc_html__( 'Previous post:', 'nubia' ) . '&lt;/span&gt;' .
  '&lt;span class="post-title"&gt;%title&lt;/span&gt;',
    ) );
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I only want help to actually change the appropriate line to make it work. Thanks.</p>