$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>terms - PrevNext Post Same taxonomy Custom Post Type|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

terms - PrevNext Post Same taxonomy Custom Post Type

matteradmin8PV0评论

I have a custom post type "cases" and a custom taxonomy "before-after-gallery". On my single-case.php my prev and next post links are jumping from one category to another.

    <?php next_post_link('%link', 'Next Case', TRUE , null , 'before-after-gallery');?>

I am telling WP to stay in the same term and not sure why its jumping. I have spent hours trying multiple solutions but no matter what I can not get the post to stay in the same category.

This only happens on the cases in which have multiple terms on each case. I have tried to omit the other terms but I can not find a way to say "this is my current term" and get the id of that term and omit others.

Running a standard wp loop

Post a comment

comment list (0)

  1. No comments so far