title: Wordpress Previous/Next Links Within Single Post of Custom Post Type Category
body: <ol>
  <li>I developed a WP theme built on <a href="https://roots.io/sage/" rel="nofollow noreferrer">Roots/Sage</a>.</li>
  <li>I have a custom post type &quot;Projects.&quot;</li>
  <li>Within projects, I've registered a taxonomy for categories (projects_category) and applied a rewrite <code>('slug' =&gt; 'projects/projects-category', 'with_front' =&gt; false)</code>.</li>
  <li>Some categories have children, most do not</li>
  <li>Within content.single-projects.php I'd like to include links to navigate to the previous/next project(post) within the current parent category.</li>
  </ol>
  <p>I've tried the following, which displays nothing:</p>
  <pre><code>&lt;?php previous_post_link( '%link', 'Previous Project', TRUE ); ?&gt;
  &lt;?php next_post_link( '%link', 'Next Project', TRUE ); ?&gt;
  </code></pre>
  <p>I've removed &quot;TRUE&quot; parameter. Post links then showed, and they included results for the entire &quot;Projects&quot; custom post type, not the current category.</p>
  <p>After many hours of searching I've come to the conclusion more code is required. I'm under the impression</p>
  <ol>
  <li>an array needs to be created containing all results for &quot;projects&quot; custom post type.</li>
  <li>the current category needs to be identified and assigned a variable,</li>
  <li>loop through the array to identify posts within the current category,</li>
  <li>identify the current post's position within the result</li>
  <li>display posts adjacent to current post.</li>
  </ol>
  <p>I have no idea where to start. Any assistance is greatly appreciated.
  Thank you.</p>