Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the heartbeat-control domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php on line 6121

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896

Warning: Cannot modify header information - headers already sent by (output started at /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/functions.php:6121) in /home2/hanthuy/public_html/wordpress.dalenguyen.me/wp-includes/rest-api/class-wp-rest-server.php on line 1896
{"id":32,"date":"2020-03-15T22:06:42","date_gmt":"2020-03-15T22:06:42","guid":{"rendered":"https:\/\/wordpress.dalenguyen.me\/?page_id=32"},"modified":"2022-01-22T19:18:43","modified_gmt":"2022-01-22T19:18:43","slug":"display-firestore-document-data","status":"publish","type":"page","link":"https:\/\/wordpress.dalenguyen.me\/display-firestore-document-data\/","title":{"rendered":"Display Firestore Document Data"},"content":{"rendered":"

This shortcode will help to retrieve document data from the Firestore database and display it as a table on your page or post.<\/p>

Remember to set the security rule for your database, so the right people can read your document.<\/em><\/span><\/p>

\/\/ show firestore data basing on collection name & document id. Display fields are required in order to show items\n\n\/\/ Show item as table\n[firestore class='your-class-name' collection_name='users' document_name='123456' display_fields='firstName,lastName,email,phone,age,gender,food,hobbies' images='imageUrl']\n\n\/\/ Show item as blocks\n[firestore class='your-class-name' collection_name='users' document_name='123456' display_fields='firstName,lastName,email,phone,age,gender,food,hobbies' images='imageUrl' display_type='blocks']\n\nI suggest that you also add this shortcode to show any error when retriving data:\n\n[firebase_error class='your-class-name'][\/firebase_error]<\/pre>

It will get the data from document-id: 123456<\/strong> under collection users<\/strong>. You can style the content by adding a class to it by replacing your-class-name.<\/strong><\/p>

\/\/ If you use: document_name='getFirebaseUid', the document name will be replaced by Firebase UID after user logs in\n\n[firestore class='your-class-name' collection_name='users' document_name='getFirebaseUid' display_fields='firstName,lastName,email,phone,age,gender,food,hobbies' images='imageUrl']<\/pre>

Here is some examples:<\/h2>

Display one image field (Table)<\/h3>
[firestore class='your-class-name' collection_name='users' document_name='o9qHiFliNmW1sxbAcmWK' images='imageUrl']<\/pre>\r\n          <\/div>

Display one image field (Blocks)<\/h3>
[firestore class='your-class-name' collection_name='users' document_name='o9qHiFliNmW1sxbAcmWK' images='imageUrl' display_type='blocks']<\/pre>\r\n          <\/div>

Display multiple fields (Table)<\/h3>
[firestore class='your-class-name' collection_name='users' document_name='o9qHiFliNmW1sxbAcmWK' display_fields='firstName,lastName,email,phone,age,gender,food,hobbies' images='imageUrl']<\/pre>\r\n          <\/div>

Display multiple fields (Blocks)<\/h3>
[firestore class='your-class-name' collection_name='users' document_name='o9qHiFliNmW1sxbAcmWK' display_fields='firstName,lastName,email,phone,age,gender,food,hobbies' images='imageUrl' display_type='blocks']<\/pre>\r\n          <\/div>
<\/div><\/div>","protected":false},"excerpt":{"rendered":"

This shortcode will help to retrieve document data from the Firestore database and display it as a table on your page or post. Remember to set the security rule for your database, so the right people can read your document. \/\/ show firestore data basing on collection name & document id. Display fields are required … Continue reading “Display Firestore Document Data”<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":244,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-32","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/pages\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":15,"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/pages\/32\/revisions"}],"predecessor-version":[{"id":509,"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/pages\/32\/revisions\/509"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/media\/244"}],"wp:attachment":[{"href":"https:\/\/wordpress.dalenguyen.me\/wp-json\/wp\/v2\/media?parent=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}