Title: Problem when posts have same post titles
Last modified: August 21, 2016

---

# Problem when posts have same post titles

 *  Resolved [fedek6](https://wordpress.org/support/users/fedek6/)
 * (@fedek6)
 * [12 years ago](https://wordpress.org/support/topic/problem-when-posts-have-same-post-titles/)
 * Hi,
    When I use such settings:
 *     ```
       'order_by' => 'custom',
       'order_2nd' => 'post_title',
       'meta_key' => 'surname',
       ```
   
 * Next and previous functions omits posts with same titles next to each other. 
   Any way to bypass this behaviour?
 * Thanks,
 * [https://wordpress.org/plugins/ambrosite-nextprevious-post-link-plus/](https://wordpress.org/plugins/ambrosite-nextprevious-post-link-plus/)

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

 *  Thread Starter [fedek6](https://wordpress.org/support/users/fedek6/)
 * (@fedek6)
 * [12 years ago](https://wordpress.org/support/topic/problem-when-posts-have-same-post-titles/#post-4913433)
 * I’ve repaired this problem by editing line 46 of your plugin:
    `if ( in_array(
   $order_2nd, array('post_date', 'post_title', 'post_modified', 'post_name')) ){`
   Simply ading option for sorting by unique slug (post_name) works just fine for
   me.
 * Greetz!
 *  Plugin Author [ambrosite](https://wordpress.org/support/users/ambrosite/)
 * (@ambrosite)
 * [12 years ago](https://wordpress.org/support/topic/problem-when-posts-have-same-post-titles/#post-4913456)
 * That’s a good fix. I might add it to the next version of the plugin, if I ever
   get around to releasing it.

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

The topic ‘Problem when posts have same post titles’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ambrosite-nextprevious-post-link-
   plus.svg)
 * [Ambrosite Next/Previous Post Link Plus](https://wordpress.org/plugins/ambrosite-nextprevious-post-link-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ambrosite-nextprevious-post-link-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ambrosite-nextprevious-post-link-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/ambrosite-nextprevious-post-link-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ambrosite-nextprevious-post-link-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ambrosite-nextprevious-post-link-plus/reviews/)

## Tags

 * [adjacent](https://wordpress.org/support/topic-tag/adjacent/)
 * [next](https://wordpress.org/support/topic-tag/next/)
 * [previous](https://wordpress.org/support/topic-tag/previous/)

 * 2 replies
 * 2 participants
 * Last reply from: [ambrosite](https://wordpress.org/support/users/ambrosite/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/problem-when-posts-have-same-post-titles/#post-4913456)
 * Status: resolved