Hi, this time! we will make a simple News Apps
the backend website that we will use is WordPress
Immediately, We create a new project!
We fill out the form provided. write based on the conditions mentioned
like fields that require using a to z characters and capital letters or spaces
Next...! we will make the required pages. such as: food, travel, health, sports
After that! we make several menu items and relate them to the page
Okey! we arrange the menu so that it looks neater
Now! we will make an ionic project
You can follow the commands on this compiler page
For the unusual with ionic. follow all the commands!
So that your work can be faster! appbuilder also creates several files
containing the "command prompt" code for windows and "bash" for linux and mac-os
start.sh or start.cmd is the same as this command
For updates and emulators, it's the same as the one in the appbuilder
just to make it easier
However! it would be better if the command is executed manually
because if there is an error it will be easier to repair it manually
OK! let's run it
It's done, let's check! is there a missing or error
OK! now we will run WordPress Posts
WordPress Page
WordPress Users
and WordPress Media addons
And this is the website that will be used as the Apps
OK. we use the WordPress Post addons!
to retrieve data in the Food category on the WordPress website
Choose the page to be targeted!
Write the title for the page!
Write a WordPress link, it must not be on the main page
Choose the layout that will be used?
To get the id category, you can go through restful API
Finally click the Save changes button or press enter
Then do it again for other pages: Health, Sports and more!
Make updates for all plugins and native ionic used
Run all of these commands
Ok! has finished to post data, now we will try to retrieve data for one page!
I will retrieve data for privacy policy
For that, we can use WordPress Page addons!
Select the target page! privacy policy
How to get a page id? login to your WordPress Dashboard.
and click the navigation menu page
then click edit! you will get a Page ID on the link in your browser's address bar
This is Page ID
We also have to fill in the WordPress URL!
And also the page title
OK! Let's save it!
Next! we checked the native plugin, is there something missing!
please follow all the commands listed here!
Now we run the emulator!
We return to the add-ons page
so that you can quickly take advantage of this recently Activity tab!
We see an emulator. have we managed to code!
Apparently, we have succeeded!
Now we will use WordPress media!
The target page is home!
The method is almost the same as before!
We write the page title and WordPress URL!!
The media that will be used are: images.
and images are displayed based on the selected media ID
To see the Media ID. just click edit
then the Media ID will appear in the url
We will save the settings. and see the results!