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.
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.
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.
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.