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:
a new subfolder for Wordpress with its own separate database.
a plugin to display the latest posts content only
an iframe on my dashboard to display the output of that plugin
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?
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 :)
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.
Related
I am working on a PHP program that does some tasks and then generates a text, this text must be able to be published later in a Wordpress (.org).
The Wordpress sites where it will publish are not mine and are not on my server so include wp-load or similar will not to work, for this, I will have in my database the login information (URL of the site, user, password).
I need to know how to connect from PHP and create the session in Wordpress.
After that, I need to get the list of categories of the blog and then publish the generated text in one of them. Can it be done directly or do I need to make a plugin for this? I don't have experience making plugins and wordpress Rest API, so if there is a direct way it would be better.
I have been trying to learn a CMS in php. Visited youtube for tutorials. Joomla & Wordpress.
But when they develop a website using a CMS, I didn't see any php code. It's all just working from a dashboard like building a blog.
I am confused about that.
Don't we have to write code in CMS like we do in Core PHP??
Hi using a CMS you can create a website simply... Wordpress is one of the best content manage system... actually they developed it for easy customization. Only using dashboard you can create pages,blogs etc only... If you want your own functionality You have to learn the coding structure and manual Plugin creation.
But the fact is You will get so many plugins from wordpress depending upon your requirement those it already developed.
As a beginner you can use CMS to create a complete site, but to add any real functionality to create specialist sites you will probably have to write you own plugins and/or themes at some point, or edit existing ones.
For this you will need php/jquery/html/whatever.
I know very little of WP aside form it being a CMS geared towards (or started from) blogging, but may people have found the product capable of functioning as their sites CMS.
I was recently asked to write a PHP app to signup, (with email confirm and email notification to admin), login to make and manage orders. - so a user can register and get an email confirmation... once they are approved, they can log in, and place an order. and manage their information. There is also an admin section to manage the users and requests... ALL very straight ahead.
So I write it - and test it and everything is fine... Until the client tells me that it's going to be part of a WP site.
Problem, the client ONLY knows HTML, NOT PHP... I don't know WP.
When I upload a directory to the root - and try to run the app, I get redirect to /$url .. and a page not found displaying in the WP theme.
I have a feeling it has to do with the AUTH module I'm using... but there is a huge BIG PICTURE issue I need to conquer - how to integrate an existing PHP app into a WP site...
Q: how do I reference and use the WP emailing system?
thx - I know it's a broad question. but if someone can point me into a direction...
I have read the post regarding templates in WP and setting up a template with PHP code so it's executed... but it seems 'wrong' to have to create a template for each php page.
What your app is about ? If you got only the Auth module already coded you should only import user and password because WP does this out-of-the-box.
Wordpress can be twist up for your need but you need to do it in the WP way :).
If you want to add some functions to it check out the plugin library on wordpress.org. If you know wordpress and no plugin match your needs then the best way to go is writing your own plugin : https://codex.wordpress.org/Writing_a_Plugin
Or maybe just add your custom functions into functions.php, see https://codex.wordpress.org/Theme_Development#Functions_File
For pages, you basically have to type of it in WP : articles - i.e. blog posts - and the static pages. You can add some custom one check https://codex.wordpress.org/Post_Types
I know this answer is more a bunch of links but if you don't nothing about WP you should first learn how it works before try to hack it.
Hope it helps !
I've built a custom website on top of the codeigniter framework. I now want to implement a 'blog' section of my website and allow various non-technical people I work with to edit/create blog entries and post them. I don't want to create a backend for this from scratch.
Are there any good plugins for codeigniter that work with existing blog hosting services to perhaps download an xml-rss feed and construct this into a blog page? Not sure what the best approach is to offer this kind of functionality to nontechnical people I work with. Any suggestions?
If it's simply the admin interface you don't want to write again, I would:
Setup the blog on the same mysql server as your CodeIgniter app OR on a server with a static IP
Create another db connection from your app to the blog's database
Use CodeIgniter to handle data, routing and the frontend views
This will allow you to better integrate the frontend interface of the blog into your existing site while keeping the blog's backend.
If you don't (for some reason) want to create another connection, you could use the RSS feeds as an XML formatted API, or create an API layer on top of the blog. This option will definitely be slower than a direct connection, but you may prefer to do it this way.
Almost all blogs provide RSS. You could just consume that and cache it using an RSS Parser library.
I have a demo running right now using this method with Tumblr
What is the best method, if there is one, of using Wordpress as a CMS for users to input data while not actually building the website on the Wordpress platform?
One possible solution I've found is using a PHP class called "WPGet" (http://peter.upfold.org.uk/projects/wpget) which fetches directly from the database.
You could use Wordpress' API calls, but depending where your "custom built application" sits, it might require including numerous files in your code (not very fun/efficient)
I have a site that requires constant updating. It's a golf club site: results, news etc all updated via wordpress by the club, or individuals with interest (juniors, ladies, seniors each have a mini-site) - and not always by me - so i have a front end, the standard site with static .php pages, which i then feed data to, by calling on posts marked in categories from wordpress, relevent to the site's page. The coding is easy and it's a quick and simple way of using wordpress as a cms, but it does strip away most of the Wordprss functionality, eg. comments, But I even use it for galleries with lightbox.
Like i say - it's nothing major, but sounds similar to what you're asking...?