libreform / wp-libre-form

Easy native HTML5 forms for WordPress. Version 1.5 is unmaintained, but works without issue. 2.0 has been rewritten from the ground, and can be found at https://github.com/libreform/libreform
https://wordpress.org/plugins/wp-libre-form
GNU General Public License v3.0
67 stars 27 forks source link

Register cpt without front #73

Closed timiwahalahti closed 5 years ago

timiwahalahti commented 7 years ago

When registering cpt for forms, we should use

'rewrite' => array(
 'with_front' => false,
),

because in some rare cases, permalink structure contains also something else than data related to post, eg /blog/ something similar.

anttiviljami commented 7 years ago

can you elaborate? I think we need with_front to be true to allow for previews.

timiwahalahti commented 7 years ago

Nope, with_front is not needed for previews. It affects only the permalink structure for singular forms.

Lets say we have set custom permalink structure to be /blog/%postname%, this causes singular form preview addresses to be /blog/libre-forms/%slug%. With setting with_front => false we can get rid of that /blog part.

timiwahalahti commented 5 years ago

93 relates to this. Will close, since fixing it will fix also this.