thenewinquiry / tni-core-functionality

Contains the site's core functionality.
GNU General Public License v2.0
2 stars 0 forks source link

Single pages for bundles #43

Closed frnsys closed 7 years ago

frnsys commented 7 years ago

Currently if I try to access a bundle at something like /bundle/foo-bar, I get a 404. If I try to access /bundle it redirects to /bundle-theory (I guess wordpress automatically searches for the closest article? Or is there an explicit redirect set-up somewhere? I wasn't able to find one).

misfist commented 7 years ago

This should work (it does for me locally). However, sometimes, you need to "fix" the permalinks, by going to Settings > Permalinks and hitting Save.

Let me know if that fixes things.

frnsys commented 7 years ago

Ah yup that did it!

misfist commented 7 years ago

I little more info...

A page for a taxonomy term is considered an archive page in WordPress. Since we don't have a more specific template for it, the archive.php template is used. So, to customize the appearance, we can either create a specific archive template or add logic to archive.php, which pulls in a specific content if the taxonomy is "bundle".

is_tax( 'bundle' )

Here is a reference: https://developer.wordpress.org/themes/basics/template-hierarchy/#visual-overview