There are several ways to add external data to a WordPress website page depending on the user:

Using a plugin:

There are several plugins available in the WordPress repository that can help you retrieve external data and display it on your website pages. For example, you can use the JSON API plugin to retrieve data from an external API and display it on your website pages using shortcodes.

Using JavaScript:

You can use JavaScript to retrieve data from an external API and display it on your website pages. This method requires a bit more technical knowledge, but it allows for more flexibility and customization.

Using a Custom Field:

You can also use a custom field to add external data to a page depending on the user. You can create custom fields for different types of data and then use the data to display it on the page.

Using a Custom template:

You can create a custom template for a specific page, and in that template, you can use the wp_remote_get to retrieve data from the external API, then use this data to display on the page.

It’s important to note that you will need to handle the user authentication, and make sure that the external data is correctly sanitized, otherwise it might lead to security issues.

(Visited 143 times, 1 visits today)
Was this article helpful?
YesNo
Close Search Window