Anyone got any pointers on the above?
Is there any way to get a list of all of the forms that have been created with contact form 7?
It’s just a custom post type, so you can query it with the usual custom query methods. I can’t for the life of me remember what the post type name is though!
Gah! should have know it was, almost everything is!
The name for CF7 CPT is called wpcf7 (you can get this by looking at the url for a CPT in the admin)
Here’s a small snippet to get you started:
$post_type = 'wpcf7_contact_form'; $args = array ( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC', ); $contact_forms = get_posts($args);
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.