justintadlock / hybrid-base

A base theme for building with the Hybrid Core framework.
GNU General Public License v2.0
154 stars 73 forks source link

loop-nav: why exclude custom post types from navigation? #8

Closed lkraav closed 9 years ago

lkraav commented 9 years ago

https://github.com/justintadlock/hybrid-base/blob/master/misc/loop-nav.php#L1

You're using this elsewhere

is_singular( get_post_type() )

Why not here for loop-nav?

BTW what's the difference between the above and just

is_singular()
lkraav commented 9 years ago

A filter perhaps?

is_singular( apply_filters( "loop_nav_post_types", array( "post" ) ) )
justintadlock commented 9 years ago

It's impossible to know whether a CPT should display navigation without knowledge of the CPT itself. So, the default is going to handle post types that it's aware of, which are the ones built into core WP. Based on my experience, the vast majority of CPTs do not need this sort of navigation, so the best default is to do nothing.

Since Hybrid Base is nothing more than a theme intended to be forked, the best option is to handle this however you see fit in your themes.

lkraav commented 9 years ago

OK. Sticking the filter in my fork.