Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,321 members, 7,811,948 topics. Date: Monday, 29 April 2024 at 12:58 AM

Wordpress Experts, Please Help : Displaying Product Via A REST API - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Wordpress Experts, Please Help : Displaying Product Via A REST API (289 Views)

Wordpress Experts Please I Need Your Help.... / Wordpress Experts, Please Help A Brother! / [php Tutorial] - Building A Rest Api (2) (3) (4)

(1) (Reply) (Go Down)

Wordpress Experts, Please Help : Displaying Product Via A REST API by EbenG(m): 7:54pm On Feb 13
Hi everyone, I'm a beginner in Word press and I'm trying to create a website that displays a dynamic list of products fetched from a REST API endpoint. Each product has fields such as name, price, description, image url to display and an external link. When users click on a particular product, they are redirected to the external link.

I want to also implement pagination.

I've explored tutorials which uses the WooCommerce plugin but they focus on manually adding products. I don't even know if i'd need to use the WooCommerce plugin at all. I want to seek guidance on the specific implementation steps, recommended plugins, themese or any helpful resources for creating this type of website.

The implementation is similar to most udemy coupon sites like this one: https://coursefolder.net/live-free-udemy-coupon.php

Thank you all in advance.
Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by losprince(m): 10:38pm On Feb 13
If you know PHP, check the wordpress codex on how to create a custom page.

On the custom page, use a http client like guzzle to make rest request to the API and then loop through the results and display them.

As for pagination, you can limit the number of items fetched per request and increment on a per page basis.

4 Likes 1 Share

Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by EbenG(m): 10:29am On Feb 14
losprince:
If you know PHP, check the wordpress codex on how to create a custom page.

On the custom page, use a http client like guzzle to make rest request to the API and then loop through the results and display them.

As for pagination, you can limit the number of items fetched per request and increment on a per page basis.


Thanks for taking out your time to reply. I'll explore this option
Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by qtguru(m): 6:08pm On Feb 14
Do you want to write code or use a plugin ? if the former let me know what you want to do, do you write PHP, also why does your name sound familiar, have I mentioned you before. take care
Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by EbenG(m): 1:36pm On Feb 15
qtguru:
Do you want to write code or use a plugin ? if the former let me know what you want to do, do you write PHP, also why does your name sound familiar, have I mentioned you before. take care
I just want to get the job done. Although, I'd prefer to use a plugin. I don't write PHP.

I've been following you here on this forum from day one. Love reading your posts, especially your diary. I'm not sure you've mentioned me before.

Thanks for the reply.
Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by qtguru(m): 2:42pm On Feb 15
where will the products be listed from ? appreciate my brother
Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by EbenG(m): 5:21pm On Feb 15
qtguru:
where will the products be listed from ? appreciate my brother

From a REST API endpoint. I have it already setup and running. It's returning a json array of products
Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by qtguru(m): 5:42pm On Feb 15
EbenG:


From a REST API endpoint. I have it already setup and running. It's returning a json array of products

Pick a time tomorrow let's get on a call and look at it.

1 Like

Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by EbenG(m): 8:38pm On Feb 15
qtguru:


Pick a time tomorrow let's get on a call and look at it.

I just sent you a mail from here. Pls check.
Thanks
Re: Wordpress Experts, Please Help : Displaying Product Via A REST API by shinemediaweb: 7:04am On Feb 19
losprince:
If you know PHP, check the wordpress codex on how to create a custom page.

On the custom page, use a http client like guzzle to make rest request to the API and then loop through the results and display them.

As for pagination, you can limit the number of items fetched per request and increment on a per page basis.


Whatsapp me on 0811___622___8641

I will walk you through the process

(1) (Reply)

Website Where You Can Offer Free Programming Training To Increase Your Sales / Civil Rights Icon And Longtime Congressman, Dies Coursing Goodtrouble In US / Complete Standard Loan Website Script And Setup At Affordable Price - View Demo

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 28
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.