New filter suggestion
-
Hey there,
within thegeneratepress/inc/structure/post-meta.php
file is a method calledgenerate_content_nav
which generates the next/prev post navigation.There is a filter called
generate_category_post_navigation
for the third parameter$in_same_term
being passed to the WordPress defaultprevious_post_link()
andnext_post_link()
methods.Unfortunately there is no filter for the fourth parameter
$excluded_terms
.It is not too bad as the function itself is pluggable and therefore can be overwritten from within a childtheme. But it would be a lot cleaner if there was simply another filter, for example
generate_excluded_category_post_navigation
for excluding certain categories from the next/prev postnavigation.Hope this helps,
- The topic ‘New filter suggestion’ is closed to new replies.