Yes, that is possible if you are doing a custom sort on the ‘Work’ meta key (which I assume you are). The function call would look something like this:
next_post_link_plus( array('order_by' => 'custom', 'meta_key' => 'work', 'link' => 'Next: Work %meta %title', 'format' => '%link') );
Thank you! That was what I was looking to do.
I’m hoping you could help me just a little bit more.
My original nav code looks very different to me and I’m not sure how to integrate it with what you’ve shared. I want to keep the original formatting, but to insert the ‘work’ meta key just before the post title with a dash in between.
Here’s the original code:
<?php previous_post_link( '<div class="previous">' . __( '%link', 'hatch-pro' ) . '</div>', '<span class="post-nav-text">← Previous:</span> %title' ); ?>
<?php next_post_link( '<div class="next">' . __( '%link', 'hatch-pro' ) . '</div>', '<span class="post-nav-text">→ Next:</span> %title' ); ?>
Try this:
<?php previous_post_link_plus( array('order_by' => 'custom', 'meta_key' => 'work', 'link' => '<span class="post-nav-text">? Previous:</span> Work %meta - %title', 'format' => '<div class="previous">' . __( '%link', 'hatch-pro' ) . '</div>') ); ?>
<?php next_post_link_plus( array('order_by' => 'custom', 'meta_key' => 'work', 'link' => '<span class="post-nav-text">? Next:</span> Work %meta - %title', 'format' => '<div class="next">' . __( '%link', 'hatch-pro' ) . '</div>') ); ?>
genius. Thank you thank you thank you.
I assume it worked then. 🙂 Would you be so kind as to mark this thread resolved?