Warren
Warren

Reputation: 2014

Use Wordpress or another CMS within a web application?

Apologies for the broad question, but I don't know where to start. I have a php web application for members with various functions and features. On the dashboard, I need to implement some dynamic news - the kind of news that that non-developer can write and publish without any interference with the source code.

Can I implement Wordpress into my existing app so that authors can login, write then publish so that my dashboard can display the latest posts?

At its most basic level, I'm thinking:

But all that seems like a very hacky workaround. Is there a more native way of doing this? Or is there another CMS library that could achieve the same result?

Upvotes: 0

Views: 143

Answers (2)

Warren
Warren

Reputation: 2014

I have a solution that I am running with. It's a separate Wordpress site with the latest posts accessed via the built-in API (https://developer.wordpress.org/rest-api/reference/posts/)

I will be getting all the posts in a category with:

curl https://example.com/wp-json/wp/v2/posts

Then storing the posts in array before looping through that array to display the title and content on my dashboard with:

curl https://example.com/wp-json/wp/v2/posts/<id>

where <id> is from the first call.

This is clean, native and serves the exact purpose I need. The member info, while secured doesn't need to be top-secret, so we're just using the Wordpress password-protection with the same password for all posts so as long as the API calls are server-side with https, the security works too :)

Upvotes: 1

Sourabh Matolia
Sourabh Matolia

Reputation: 169

Looks like you want Dynamic News Feature in your existing PHP Web Application. And you want to build that specific feature in Wordpress.

I don't think it's a good idea to use Wordpress CMS for small features like this. IF you already have full functional PHP Web Application then I would recommend to use same Web Application to build Dynamic News Feature which will allow users on the site to post. I don't think that's very complex.

IF you want to get into Wordpress ecosystem then you will need to convert your PHP Web Application into Wordpress and then you can build additional functionality.

I think that's the ideal way to go. Let me know if more questions. Thanks.

Upvotes: 0

Related Questions