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 6121This 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> 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> 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}]}}\/\/ 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>
\/\/ 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
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
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
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