New answers tagged

0

It turns out the Wordpress permalink structure works perfectly well for custom types, e.g. example.com/recipes/lunch/sandwich/. This works exactly as expected if you set 'hierarchical' => true. What I was originally trying to do was unnecessarily difficult to execute, and requires properly setting up a custom permalink structure to avoid 404 errors. I ...


0

You're pretty close. Your rewrite rule is using the wrong query var, pagename should be just name. Here's a version that works for me on a fresh 4.4.1 install and twentysixteen theme- function bvt_product_init() { $args = array( 'label' => __( 'Product', 'domain' ), 'description' => __( 'Company ...



Top 50 recent answers are included