Skip to content

Commit

Permalink
update docs with pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
dalenguyen committed Apr 22, 2023
1 parent a8d2dbf commit 64b9503
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
30 changes: 30 additions & 0 deletions docs/database/display-firestore-with-pagination.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Display Firestore with Pagination in WordPress
=============

In this tutorial, I will show you how to retrieve the database from your Firestore and display it on the WordPress website with pagination. Before that, make sure you have:

- Install and active Integrate Firebase plugin
- Update the firebase configuration on the Firebase dashboard
- Make sure that Firebase security rules allow you to access the document with or without logging in

The plugin support getting one document and display on the frontend as a table with the shortcode.

.. code-block:: php
[firestore_pagination
class='test'
collection_name='users'
display_fields='firstName,lastName,email'
order_by='createdAt|DESC'
limit="4" child_page='https://wordpress.dalenguyen.me/dynamic-display-firestore-data-from-table/'
child_page_target_field='firstName'
pagination="true"
]
.. figure:: /images/database/firestore-with-pagination.png
:scale: 70%
:align: center

Display firestore with pagination

If the default shortcode doesn't suite your needs, you can create a custom one. Please follow the guide for developers.
2 changes: 2 additions & 0 deletions docs/database/retrieve-data-from-firestore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ In this tutorial, I will show you how to retrieve the database from your Firesto

The plugin support getting one document and display on the frontend as a table with the shortcode.

Demo: https://wordpress.dalenguyen.me/display-firestore-collection-with-pagination/

.. code-block:: php
// Get document id '1' from 'users' collection from realtime database
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Complete Guide to Firebase WordPress Integration
.. meta::
:description lang=en: Guide on how to integrate Firebase to WordPress.

Last updated: Mar 20, 2023
Last updated: Apr 22, 2023

.. raw:: html

Expand Down Expand Up @@ -116,8 +116,8 @@ Database
From WordPress, users can retrieve or write data from Firebase Realtime / Firestore using shortcodes.

* :doc:`/database/retrieve-data-from-firestore`
* :doc:`/database/display-firestore-with-pagination`
* :doc:`/database/dynamically-display-from-firestore`

* :doc:`/database/save-data-realtime-firestore`
* :doc:`/database/work-with-firebase-custom-claims`

Expand All @@ -127,6 +127,7 @@ From WordPress, users can retrieve or write data from Firebase Realtime / Firest
:caption: Database

/database/retrieve-data-from-firestore
/database/display-firestore-with-pagination
/database/dynamically-display-from-firestore
/database/save-data-realtime-firestore
/database/work-with-firebase-custom-claims
Expand Down
9 changes: 9 additions & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ CHANGELOG

All notable changes to this project will be documented in this file.

## v2.45.0 (2023-04-22)
----------------------------------

#### - :rocket: [New Feature]

- `PRO - v3.28.0`
- add translation for signup form
- add firestore pagination

## v2.44.0 (2023-03-20)
----------------------------------

Expand Down

0 comments on commit 64b9503

Please sign in to comment.