Saltar navegación

[Resuelto] Adding Twitter feed and contact form to content template

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

The customer asked how to add a dynamic Twitter feed linked to the custom field and a contact form to the content template

Solution:

For the Twitter feed, shared information of how Twitter's embed code works and how Toolset's Types field shortcode can be included in it to make it dynamic.

And for the contact form suggested adding a new CPT "Contact Requests" and then collecting new submissions using the Toolset post form.

Relevant Documentation:

https://publish.twitter.com

https://toolset.com/course-chapter/forms-for-front-end-submission-and-editing-of-directory-items/

This support ticket is created 4 years, 5 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 -

Zona horaria del colaborador: Asia/Karachi (GMT+05:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por ianC-8 4 years, 5 months ago.

Asistido por: Waqar.

Autor
Mensajes
#2255673

Tell us what you are trying to do? We would like to display a Twitter feed (based on the listing's entered Twitter account) and a contact form (linking to the listing's email address) within a content template.

Is there any documentation that you are following? I have checked your support documentation but can't see any reference to this - sorry if I have missed anything!

Is there a similar example that we can see? The form and feed would be in the right side-bar of a listing like this, appearing under the map. enlace oculto?

What is the link to your site? enlace oculto?

#2255803

Hi,

The embed code for the Twitter feed/timeline from Twitter's website ( enlace oculto ) looks like this:


<em><u>enlace oculto</u></em>
<script async src="<em><u>enlace oculto</u></em>" charset="utf-8"></script>

Note: In this example code the Twitter account used for the timeline is "androidcentral".

You can make this code dynamic by linking the Twitter account part to a custom field value, so that a different timeline can be shown for each listing.

1. You'll add a new "Twitter Account" single-line type custom field with listing post type (slug "twitter-account"), in which the Twitter account value ( e.g. androidcentral ) can be saved.

2. Next, in your content template for listings, you can include a "Custom HTML" block to add this embed code, with the Toolset Types field shortcode, like this:


<em><u>enlace oculto</u></em>
<script async src="<em><u>enlace oculto</u></em>" charset="utf-8"></script>

As for the contact form, you can register a new custom post type "Contact Requests" to collect contact form submissions and then create a new form to add posts to this post type, using Toolset Forms. Here is a guide on using the Toolset Forms:
https://toolset.com/course-chapter/forms-for-front-end-submission-and-editing-of-directory-items/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2257697

My issue is resolved now. Thank you!