Navigation überspringen

[Gelöst] Adding Twitter feed and contact form to content template

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 4 years, 5 months. 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 -

Zeitzone des Unterstützers: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von ianC-8 vor 4 years, 5 months.

Assistiert von: Waqar.

Author
Artikel
#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. versteckter Link?

What is the link to your site? versteckter Link?

#2255803

Hi,

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


<em><u>versteckter Link</u></em>
<script async src="<em><u>versteckter Link</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>versteckter Link</u></em>
<script async src="<em><u>versteckter Link</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!