Skip Navigation

[Resolved] Template with Gutenberg: different questions

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 7 replies, has 2 voices.

Last updated by benjaminH-7 2 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#2486621

Tell us what you are trying to do?
I have a custom post type astrofotos, where members can upload their astro images with different infos. Now I would like to get working the following:
- uploaded post image should be linked to the media file itself in order to get a fancybox working - popup with the big image
- I would like to link to the author archive: see all posts (astrofotos) from this author.
- How can I display the time when a date field is filled out?
- How can I ensure, that the post image (astro foto) is uploaded before the user form is submitted

What is the link to your site?
hidden link

#2487513

Hello,

Those requests you mentioned above can be done within Toolset plugins.

See below test site, login URL:
hidden link

Here are detail steps:
1) Setup a custom multiple instance image field for post type "astrofotos":
hidden link

2) Setup a post form for creating new "astrofotos" post:
hidden link
enable option "Use the WordPress Media Library manager for image, video, audio, or file fields"
Display above post form in a page:
hidden link

3) Setup a content template for single "astrofotos" post:
hidden link
There are two kinds block can display custom multiple instances image field:
- Toolset Gallery block
- Toolset Image Slider block

4) Setup a WordPress Archive for post type "astrofotos" using classic editor:
hidden link
in section "Loops Selection", enable option: Author archives, and display posts of post type "astrofotos"
In view's loop display a content template, and design the content template with Blocks editor, display what you want:
see the demo author archive page:
hidden link

It is just a demo for your reference.

#2487569

Hi,

thanks, my questions were a little bit specific:
- how can I add a link within the single post template "astrofotos" to the post image in order to get a lightbox popup? I Would like to use the post image, which is uploaded - there is no gallery block.
- Can I make default fields at the content form required, e.g. the post image?

Regards

#2487765

I´ve seen your examples. I need to attach the uploaded photo as featured post image.

#2488391
lightbox2.jpg

You can try these:
1) edit the custom post type "astrofotos":
hidden link
in section "Sections to display when editing", enable option: Featured Image

2) Edit the post form for creating new "astrofotos" post:
hidden link
Add the "Featured Image" field

3) So users can submit image in frontend

4) Edit the content template forsingle "astrofotos" post:
hidden link
display a Toolset image block, choose the source from featured image, and in option "Link To" use option: lightbox, see my screenshot lightbox2.jpg
See the result here:
hidden link
And author archive page:
hidden link

5) You can use filter hook "cred_form_validate" to make featured image field of Toolset post forms to be required
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate
click link "Usage examples", the first example codes can validate the feature image field.

#2488451

Thanks, I could solve the missing image problem at the user frontend form and I could solve the featured image lightbox.

I think, the author archive I can fix also - I need some time.

Another question I came over: can I limit / select, which categories are selectable at the user post form?

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/another-question-i-came-over/

#2488473

According to our support policy, we prefer one ticket one question, for other new questions, please check the new thread here:
https://toolset.com/forums/topic/another-question-i-came-over/

#2488475

My issue is resolved now. Thank you!