Problem:
Display CRED Edit form for Products and "Edit" link below the WooCommerce product description in the single-products.php template file.
Can we use the below shortcode in a php template file (e.g. WooCommerce single-product.php)?
[toolset-edit-post-link content_template_slug="cred-edit-form-in-ct"]Edit %%POST_TITLE%%[/toolset-edit-post-link]
Solution:
No, at moment CRED Edit form shortcode can not be executed in WooCommerce single-product.php -- it is submitted as a feature request for further consideration. However, this shortcode works fine in normal post template php files.
1. Alternatively, display CRED editing forms for Products using standard Toolset method which works great:
https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/
2. OR you may want to use Views shortcode “Post edit link”.
[wpv-post-edit-link text="Edit Item"]
This does not work as frontend edit form but just gives a link that will take user to backend editor.
Some testing notes:
- This shortcode [toolset-edit-post-link] works when we insert directly in Product's body content / Product Description editor (NO Views CT).
- This shortcode [toolset-edit-post-link] also works when we add it in single.php file (Posts) and single-book.php file (CPT).
Relevant Documentation:
- https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/
- [toolset-edit-post-link] shortcode and its attributes are mentioned here:
https://toolset.com/documentation/user-guides/views-shortcodes/#toolset-edit-post-link
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
This topic contains 17 replies, has 2 voices.
Last updated by Cec1413 6 years, 8 months ago.
Assisted by: Noman.
The forum ‘Types Community Support’ is closed to new topics and replies.