Skip Navigation

[Resolved] How Block combine static and dynamic content

This support ticket is created 3 years, 7 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: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Jamal 3 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#2104897

Dear Sir/Madam,

I have a custom post with a custom field, how can I combine the static and dynamic content together like

Date: 23 Jul 2021

Date: is the static content

23 Jul 2021 is dynamic content from a custom field

Best regards,

Kelvin.

#2104939

Hello Kelvin and thank you for contacting Toolset support.

Well you can do it using multiple kinds of blocks. For example:
- You can use the "Fields&Text" block, and inside of it use the view's button to choose the custom field. Check this screenshot hidden link
- You can use a Paragraph block, or a Classic block, and choose the custom field using Toolset Inline dynamic sources. Check this screenshot hidden link

I hope this helps. Let me know if you have any questions.

#2105153
Screenshot 2021-07-03 at 6.03.28 AM.png
Screenshot 2021-07-03 at 6.03.05 AM.png

Dear Jamal,

Thanks for your reply. It is useful. I face another issue when inserting the custom field.
Here is the code I insert into the Field and Text, I don't know why the date formats is different from backend and frontend.

<p>Date: [types field='workshop-date' style='text' format='F j, Y g:i a'][/types] ([types field='workshop-duration-hour'][/types] hour(s) [types field='duration-minute'][/types] minutes)<br /><a href="[types field='zoom-url' output='raw'][/types]">Click here to start Zoom</a><br />Meeting ID: <b>[types field='zoom-meeting-id'][/types]</b><br />Passcord: <b>[types field='zoom-passcode'][/types]</b></p>

I think the date format may be related to the client's browser but I do the backend and frontend on the same browser, how I can force the date format to same as my setting in the backend?

Best regards,

Kelvin.

#2105391

Well, I would say that the backend is somehow affected by other things. Maybe another plugin, or the theme, or at the worst case a bug.

The format is instructed in the shortcode format='F j, Y g:i a' and it should follow this format table based on the site language. If it is not the case, please open a new ticket and allow us access to check it further.
https://wordpress.org/support/article/formatting-date-and-time/

For support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have to kindly ask you to open a new thread if you need further assistance.